Documentation ¶
Index ¶
- Variables
- func RegisterRegistryServer(s *grpc.Server, srv RegistryServer)
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetKinds() []ServiceKind
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- func (m *ListRequest) Validate() error
- type ListRequestValidationError
- func (e ListRequestValidationError) Cause() error
- func (e ListRequestValidationError) Error() string
- func (e ListRequestValidationError) ErrorName() string
- func (e ListRequestValidationError) Field() string
- func (e ListRequestValidationError) Key() bool
- func (e ListRequestValidationError) Reason() string
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetMetadata() map[string]*anypb.Any
- func (x *RegisterRequest) GetServices() []*Service
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- func (m *RegisterRequest) Validate() error
- type RegisterRequestValidationError
- func (e RegisterRequestValidationError) Cause() error
- func (e RegisterRequestValidationError) Error() string
- func (e RegisterRequestValidationError) ErrorName() string
- func (e RegisterRequestValidationError) Field() string
- func (e RegisterRequestValidationError) Key() bool
- func (e RegisterRequestValidationError) Reason() string
- type RegisterResponse
- func (*RegisterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterResponse) GetCallBackAfter() *durationpb.Duration
- func (*RegisterResponse) ProtoMessage()
- func (x *RegisterResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterResponse) Reset()
- func (x *RegisterResponse) String() string
- func (m *RegisterResponse) Validate() error
- type RegisterResponseValidationError
- func (e RegisterResponseValidationError) Cause() error
- func (e RegisterResponseValidationError) Error() string
- func (e RegisterResponseValidationError) ErrorName() string
- func (e RegisterResponseValidationError) Field() string
- func (e RegisterResponseValidationError) Key() bool
- func (e RegisterResponseValidationError) Reason() string
- type RegistryClient
- type RegistryServer
- type Registry_WatchClient
- type Registry_WatchServer
- type Service
- func (*Service) Descriptor() ([]byte, []int)deprecated
- func (x *Service) GetEndpoint() string
- func (x *Service) GetKind() ServiceKind
- func (*Service) ProtoMessage()
- func (x *Service) ProtoReflect() protoreflect.Message
- func (x *Service) Reset()
- func (x *Service) String() string
- func (m *Service) Validate() error
- type ServiceKind
- func (ServiceKind) Descriptor() protoreflect.EnumDescriptor
- func (x ServiceKind) Enum() *ServiceKind
- func (ServiceKind) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServiceKind) Number() protoreflect.EnumNumber
- func (x ServiceKind) String() string
- func (ServiceKind) Type() protoreflect.EnumType
- type ServiceList
- func (*ServiceList) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceList) GetServices() []*Service
- func (*ServiceList) ProtoMessage()
- func (x *ServiceList) ProtoReflect() protoreflect.Message
- func (x *ServiceList) Reset()
- func (x *ServiceList) String() string
- func (m *ServiceList) Validate() error
- type ServiceListValidationError
- func (e ServiceListValidationError) Cause() error
- func (e ServiceListValidationError) Error() string
- func (e ServiceListValidationError) ErrorName() string
- func (e ServiceListValidationError) Field() string
- func (e ServiceListValidationError) Key() bool
- func (e ServiceListValidationError) Reason() string
- type ServiceRegistration
- func (*ServiceRegistration) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceRegistration) GetExpiresAt() *timestamppb.Timestamp
- func (x *ServiceRegistration) GetService() *Service
- func (*ServiceRegistration) ProtoMessage()
- func (x *ServiceRegistration) ProtoReflect() protoreflect.Message
- func (x *ServiceRegistration) Reset()
- func (x *ServiceRegistration) String() string
- func (m *ServiceRegistration) Validate() error
- type ServiceRegistrationValidationError
- func (e ServiceRegistrationValidationError) Cause() error
- func (e ServiceRegistrationValidationError) Error() string
- func (e ServiceRegistrationValidationError) ErrorName() string
- func (e ServiceRegistrationValidationError) Field() string
- func (e ServiceRegistrationValidationError) Key() bool
- func (e ServiceRegistrationValidationError) Reason() string
- type ServiceValidationError
- type UnimplementedRegistryServer
Constants ¶
This section is empty.
Variables ¶
var ( ServiceKind_name = map[int32]string{ 0: "UNDEFINED_DO_NOT_USE", 1: "DATABROKER", 2: "AUTHORIZE", 3: "AUTHENTICATE", 4: "PROXY", 5: "REGISTRY", 6: "CONSOLE", 7: "PROMETHEUS_METRICS", } ServiceKind_value = map[string]int32{ "UNDEFINED_DO_NOT_USE": 0, "DATABROKER": 1, "AUTHORIZE": 2, "AUTHENTICATE": 3, "PROXY": 4, "REGISTRY": 5, "CONSOLE": 6, "PROMETHEUS_METRICS": 7, } )
Enum value maps for ServiceKind.
var File_registry_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRegistryServer ¶
func RegisterRegistryServer(s *grpc.Server, srv RegistryServer)
Types ¶
type ListRequest ¶
type ListRequest struct { Kinds []ServiceKind `protobuf:"varint,1,rep,packed,name=kinds,proto3,enum=registry.ServiceKind" json:"kinds,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetKinds ¶
func (x *ListRequest) GetKinds() []ServiceKind
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
func (*ListRequest) Validate ¶
func (m *ListRequest) Validate() error
Validate checks the field values on ListRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ListRequestValidationError ¶
type ListRequestValidationError struct {
// contains filtered or unexported fields
}
ListRequestValidationError is the validation error returned by ListRequest.Validate if the designated constraints aren't met.
func (ListRequestValidationError) Cause ¶
func (e ListRequestValidationError) Cause() error
Cause function returns cause value.
func (ListRequestValidationError) Error ¶
func (e ListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListRequestValidationError) ErrorName ¶
func (e ListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListRequestValidationError) Field ¶
func (e ListRequestValidationError) Field() string
Field function returns field value.
func (ListRequestValidationError) Key ¶
func (e ListRequestValidationError) Key() bool
Key function returns key value.
func (ListRequestValidationError) Reason ¶
func (e ListRequestValidationError) Reason() string
Reason function returns reason value.
type RegisterRequest ¶
type RegisterRequest struct { // services this deployment runs Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` // service may optionally provide certain metadata, such as // - build version // - startup time // - bootstrap configuration // - OS, OS version, OS hostname // - etc // this information is not distributed back to the inquiring nodes // and may also have a different storage and time to live Metadata map[string]*anypb.Any `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetMetadata ¶
func (x *RegisterRequest) GetMetadata() map[string]*anypb.Any
func (*RegisterRequest) GetServices ¶
func (x *RegisterRequest) GetServices() []*Service
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
func (*RegisterRequest) Validate ¶
func (m *RegisterRequest) Validate() error
Validate checks the field values on RegisterRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type RegisterRequestValidationError ¶
type RegisterRequestValidationError struct {
// contains filtered or unexported fields
}
RegisterRequestValidationError is the validation error returned by RegisterRequest.Validate if the designated constraints aren't met.
func (RegisterRequestValidationError) Cause ¶
func (e RegisterRequestValidationError) Cause() error
Cause function returns cause value.
func (RegisterRequestValidationError) Error ¶
func (e RegisterRequestValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterRequestValidationError) ErrorName ¶
func (e RegisterRequestValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterRequestValidationError) Field ¶
func (e RegisterRequestValidationError) Field() string
Field function returns field value.
func (RegisterRequestValidationError) Key ¶
func (e RegisterRequestValidationError) Key() bool
Key function returns key value.
func (RegisterRequestValidationError) Reason ¶
func (e RegisterRequestValidationError) Reason() string
Reason function returns reason value.
type RegisterResponse ¶
type RegisterResponse struct { // indicates when to report back again CallBackAfter *durationpb.Duration `protobuf:"bytes,2,opt,name=call_back_after,json=callBackAfter,proto3" json:"call_back_after,omitempty"` // contains filtered or unexported fields }
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetCallBackAfter ¶
func (x *RegisterResponse) GetCallBackAfter() *durationpb.Duration
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
func (*RegisterResponse) Validate ¶
func (m *RegisterResponse) Validate() error
Validate checks the field values on RegisterResponse with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type RegisterResponseValidationError ¶
type RegisterResponseValidationError struct {
// contains filtered or unexported fields
}
RegisterResponseValidationError is the validation error returned by RegisterResponse.Validate if the designated constraints aren't met.
func (RegisterResponseValidationError) Cause ¶
func (e RegisterResponseValidationError) Cause() error
Cause function returns cause value.
func (RegisterResponseValidationError) Error ¶
func (e RegisterResponseValidationError) Error() string
Error satisfies the builtin error interface
func (RegisterResponseValidationError) ErrorName ¶
func (e RegisterResponseValidationError) ErrorName() string
ErrorName returns error name.
func (RegisterResponseValidationError) Field ¶
func (e RegisterResponseValidationError) Field() string
Field function returns field value.
func (RegisterResponseValidationError) Key ¶
func (e RegisterResponseValidationError) Key() bool
Key function returns key value.
func (RegisterResponseValidationError) Reason ¶
func (e RegisterResponseValidationError) Reason() string
Reason function returns reason value.
type RegistryClient ¶
type RegistryClient interface { // Report is periodically sent by each service to confirm it is still serving // with the registry data is persisted with a certain TTL Report(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) // List returns current snapshot of the services known to the registry List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ServiceList, error) // Watch returns a stream of updates // for the simplicity of consumer its delivered as full snapshots // and is only sent when change is detected Watch(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Registry_WatchClient, error) }
RegistryClient is the client API for Registry service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRegistryClient ¶
func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient
type RegistryServer ¶
type RegistryServer interface { // Report is periodically sent by each service to confirm it is still serving // with the registry data is persisted with a certain TTL Report(context.Context, *RegisterRequest) (*RegisterResponse, error) // List returns current snapshot of the services known to the registry List(context.Context, *ListRequest) (*ServiceList, error) // Watch returns a stream of updates // for the simplicity of consumer its delivered as full snapshots // and is only sent when change is detected Watch(*ListRequest, Registry_WatchServer) error }
RegistryServer is the server API for Registry service.
type Registry_WatchClient ¶
type Registry_WatchClient interface { Recv() (*ServiceList, error) grpc.ClientStream }
type Registry_WatchServer ¶
type Registry_WatchServer interface { Send(*ServiceList) error grpc.ServerStream }
type Service ¶
type Service struct { // kind is service kind Kind ServiceKind `protobuf:"varint,1,opt,name=kind,proto3,enum=registry.ServiceKind" json:"kind,omitempty"` // network endpoints this service may be reachable at Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"` // contains filtered or unexported fields }
func (*Service) Descriptor
deprecated
func (*Service) GetEndpoint ¶
func (*Service) GetKind ¶
func (x *Service) GetKind() ServiceKind
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) ProtoReflect ¶
func (x *Service) ProtoReflect() protoreflect.Message
type ServiceKind ¶
type ServiceKind int32
const ( ServiceKind_UNDEFINED_DO_NOT_USE ServiceKind = 0 // databroker grpc service ServiceKind_DATABROKER ServiceKind = 1 // authorize grpc service ServiceKind_AUTHORIZE ServiceKind = 2 // authentication http(s) service ServiceKind_AUTHENTICATE ServiceKind = 3 // proxy service ServiceKind_PROXY ServiceKind = 4 // registry service ServiceKind_REGISTRY ServiceKind = 5 // console grpc service ServiceKind_CONSOLE ServiceKind = 6 // prometheus metrics compatible http endpoint ServiceKind_PROMETHEUS_METRICS ServiceKind = 7 )
func (ServiceKind) Descriptor ¶
func (ServiceKind) Descriptor() protoreflect.EnumDescriptor
func (ServiceKind) Enum ¶
func (x ServiceKind) Enum() *ServiceKind
func (ServiceKind) EnumDescriptor
deprecated
func (ServiceKind) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServiceKind.Descriptor instead.
func (ServiceKind) Number ¶
func (x ServiceKind) Number() protoreflect.EnumNumber
func (ServiceKind) String ¶
func (x ServiceKind) String() string
func (ServiceKind) Type ¶
func (ServiceKind) Type() protoreflect.EnumType
type ServiceList ¶
type ServiceList struct { Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` // contains filtered or unexported fields }
RegistrationSnapshot represents the current state of the services
func (*ServiceList) Descriptor
deprecated
func (*ServiceList) Descriptor() ([]byte, []int)
Deprecated: Use ServiceList.ProtoReflect.Descriptor instead.
func (*ServiceList) GetServices ¶
func (x *ServiceList) GetServices() []*Service
func (*ServiceList) ProtoMessage ¶
func (*ServiceList) ProtoMessage()
func (*ServiceList) ProtoReflect ¶
func (x *ServiceList) ProtoReflect() protoreflect.Message
func (*ServiceList) Reset ¶
func (x *ServiceList) Reset()
func (*ServiceList) String ¶
func (x *ServiceList) String() string
func (*ServiceList) Validate ¶
func (m *ServiceList) Validate() error
Validate checks the field values on ServiceList with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ServiceListValidationError ¶
type ServiceListValidationError struct {
// contains filtered or unexported fields
}
ServiceListValidationError is the validation error returned by ServiceList.Validate if the designated constraints aren't met.
func (ServiceListValidationError) Cause ¶
func (e ServiceListValidationError) Cause() error
Cause function returns cause value.
func (ServiceListValidationError) Error ¶
func (e ServiceListValidationError) Error() string
Error satisfies the builtin error interface
func (ServiceListValidationError) ErrorName ¶
func (e ServiceListValidationError) ErrorName() string
ErrorName returns error name.
func (ServiceListValidationError) Field ¶
func (e ServiceListValidationError) Field() string
Field function returns field value.
func (ServiceListValidationError) Key ¶
func (e ServiceListValidationError) Key() bool
Key function returns key value.
func (ServiceListValidationError) Reason ¶
func (e ServiceListValidationError) Reason() string
Reason function returns reason value.
type ServiceRegistration ¶
type ServiceRegistration struct { Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // contains filtered or unexported fields }
func (*ServiceRegistration) Descriptor
deprecated
func (*ServiceRegistration) Descriptor() ([]byte, []int)
Deprecated: Use ServiceRegistration.ProtoReflect.Descriptor instead.
func (*ServiceRegistration) GetExpiresAt ¶
func (x *ServiceRegistration) GetExpiresAt() *timestamppb.Timestamp
func (*ServiceRegistration) GetService ¶
func (x *ServiceRegistration) GetService() *Service
func (*ServiceRegistration) ProtoMessage ¶
func (*ServiceRegistration) ProtoMessage()
func (*ServiceRegistration) ProtoReflect ¶
func (x *ServiceRegistration) ProtoReflect() protoreflect.Message
func (*ServiceRegistration) Reset ¶
func (x *ServiceRegistration) Reset()
func (*ServiceRegistration) String ¶
func (x *ServiceRegistration) String() string
func (*ServiceRegistration) Validate ¶
func (m *ServiceRegistration) Validate() error
Validate checks the field values on ServiceRegistration with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ServiceRegistrationValidationError ¶
type ServiceRegistrationValidationError struct {
// contains filtered or unexported fields
}
ServiceRegistrationValidationError is the validation error returned by ServiceRegistration.Validate if the designated constraints aren't met.
func (ServiceRegistrationValidationError) Cause ¶
func (e ServiceRegistrationValidationError) Cause() error
Cause function returns cause value.
func (ServiceRegistrationValidationError) Error ¶
func (e ServiceRegistrationValidationError) Error() string
Error satisfies the builtin error interface
func (ServiceRegistrationValidationError) ErrorName ¶
func (e ServiceRegistrationValidationError) ErrorName() string
ErrorName returns error name.
func (ServiceRegistrationValidationError) Field ¶
func (e ServiceRegistrationValidationError) Field() string
Field function returns field value.
func (ServiceRegistrationValidationError) Key ¶
func (e ServiceRegistrationValidationError) Key() bool
Key function returns key value.
func (ServiceRegistrationValidationError) Reason ¶
func (e ServiceRegistrationValidationError) Reason() string
Reason function returns reason value.
type ServiceValidationError ¶
type ServiceValidationError struct {
// contains filtered or unexported fields
}
ServiceValidationError is the validation error returned by Service.Validate if the designated constraints aren't met.
func (ServiceValidationError) Cause ¶
func (e ServiceValidationError) Cause() error
Cause function returns cause value.
func (ServiceValidationError) Error ¶
func (e ServiceValidationError) Error() string
Error satisfies the builtin error interface
func (ServiceValidationError) ErrorName ¶
func (e ServiceValidationError) ErrorName() string
ErrorName returns error name.
func (ServiceValidationError) Field ¶
func (e ServiceValidationError) Field() string
Field function returns field value.
func (ServiceValidationError) Key ¶
func (e ServiceValidationError) Key() bool
Key function returns key value.
func (ServiceValidationError) Reason ¶
func (e ServiceValidationError) Reason() string
Reason function returns reason value.
type UnimplementedRegistryServer ¶
type UnimplementedRegistryServer struct { }
UnimplementedRegistryServer can be embedded to have forward compatible implementations.
func (*UnimplementedRegistryServer) List ¶
func (*UnimplementedRegistryServer) List(context.Context, *ListRequest) (*ServiceList, error)
func (*UnimplementedRegistryServer) Report ¶
func (*UnimplementedRegistryServer) Report(context.Context, *RegisterRequest) (*RegisterResponse, error)
func (*UnimplementedRegistryServer) Watch ¶
func (*UnimplementedRegistryServer) Watch(*ListRequest, Registry_WatchServer) error