Documentation ¶
Index ¶
- Variables
- func DeregisterRegistryEnhancedServer(s grpc.ServiceRegistrar, name string)
- func RegisterRegistryEnhancedServer(s grpc.ServiceRegistrar, srv NamedRegistryServer)
- func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer)
- type ActionType
- type EmptyResponse
- type Endpoint
- func (*Endpoint) Descriptor() ([]byte, []int)deprecated
- func (x *Endpoint) GetMetadata() map[string]string
- func (x *Endpoint) GetName() string
- func (x *Endpoint) GetRequest() *Value
- func (x *Endpoint) GetResponse() *Value
- func (*Endpoint) ProtoMessage()
- func (x *Endpoint) ProtoReflect() protoreflect.Message
- func (x *Endpoint) Reset()
- func (x *Endpoint) String() string
- func (this *Endpoint) Validate() error
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetId() string
- func (x *Event) GetItem() *Item
- func (x *Event) GetTimestamp() int64
- func (x *Event) GetType() EventType
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- func (this *Event) Validate() error
- type EventType
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRequest) GetName() string
- func (x *GetRequest) GetOptions() *Options
- func (*GetRequest) ProtoMessage()
- func (x *GetRequest) ProtoReflect() protoreflect.Message
- func (x *GetRequest) Reset()
- func (x *GetRequest) String() string
- func (this *GetRequest) Validate() error
- type GetResponse
- type Item
- func (*Item) Descriptor() ([]byte, []int)deprecated
- func (m *Item) GetItem() isItem_Item
- func (x *Item) GetNode() *Node
- func (x *Item) GetService() *Service
- func (*Item) ProtoMessage()
- func (x *Item) ProtoReflect() protoreflect.Message
- func (x *Item) Reset()
- func (x *Item) String() string
- func (this *Item) Validate() error
- type ItemMap
- type ItemType
- type Item_Node
- type Item_Service
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetOptions() *Options
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- func (this *ListRequest) Validate() error
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponse) GetItems() []*Item
- func (*ListResponse) ProtoMessage()
- func (x *ListResponse) ProtoReflect() protoreflect.Message
- func (x *ListResponse) Reset()
- func (x *ListResponse) String() string
- func (this *ListResponse) Validate() error
- type NamedRegistryServer
- type Node
- func (*Node) Descriptor() ([]byte, []int)deprecated
- func (x *Node) GetAddress() []string
- func (x *Node) GetEndpoints() []string
- func (x *Node) GetId() string
- func (x *Node) GetMetadata() map[string]string
- func (x *Node) GetName() string
- func (x *Node) GetPort() int64
- func (*Node) ProtoMessage()
- func (x *Node) ProtoReflect() protoreflect.Message
- func (x *Node) Reset()
- func (x *Node) String() string
- func (this *Node) Validate() error
- type Options
- func (*Options) Descriptor() ([]byte, []int)deprecated
- func (x *Options) GetAction() ActionType
- func (x *Options) GetTtl() int64
- func (x *Options) GetType() ItemType
- func (*Options) ProtoMessage()
- func (x *Options) ProtoReflect() protoreflect.Message
- func (x *Options) Reset()
- func (x *Options) String() string
- func (this *Options) Validate() error
- type RegistryClient
- type RegistryEnhancedServer
- func (m RegistryEnhancedServer) Deregister(ctx context.Context, r *Item) (*EmptyResponse, error)
- func (m RegistryEnhancedServer) Get(ctx context.Context, r *GetRequest) (*GetResponse, error)
- func (m RegistryEnhancedServer) List(ctx context.Context, r *ListRequest) (*ListResponse, error)
- func (m RegistryEnhancedServer) Register(ctx context.Context, r *Item) (*EmptyResponse, error)
- func (m RegistryEnhancedServer) Start(ctx context.Context, r *Item) (*EmptyResponse, error)
- func (m RegistryEnhancedServer) Stop(ctx context.Context, r *Item) (*EmptyResponse, error)
- func (m RegistryEnhancedServer) Watch(r *WatchRequest, s Registry_WatchServer) error
- type RegistryServer
- type RegistryStub
- type RegistryStub_WatchStreamer
- type Registry_WatchClient
- type Registry_WatchServer
- type Result
- func (*Result) Descriptor() ([]byte, []int)deprecated
- func (x *Result) GetAction() ActionType
- func (x *Result) GetItems() []*Item
- func (x *Result) GetTimestamp() int64
- func (*Result) ProtoMessage()
- func (x *Result) ProtoReflect() protoreflect.Message
- func (x *Result) Reset()
- func (x *Result) String() string
- func (this *Result) Validate() error
- type Service
- func (*Service) Descriptor() ([]byte, []int)deprecated
- func (x *Service) GetId() string
- func (x *Service) GetMetadata() map[string]string
- func (x *Service) GetName() string
- func (x *Service) GetNodes() []*Node
- func (x *Service) GetOptions() *Options
- func (x *Service) GetVersion() string
- func (*Service) ProtoMessage()
- func (x *Service) ProtoReflect() protoreflect.Message
- func (x *Service) Reset()
- func (x *Service) String() string
- func (this *Service) Validate() error
- type StartRequest
- func (*StartRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StartRequest) GetItem() *Item
- func (*StartRequest) ProtoMessage()
- func (x *StartRequest) ProtoReflect() protoreflect.Message
- func (x *StartRequest) Reset()
- func (x *StartRequest) String() string
- func (this *StartRequest) Validate() error
- type StopRequest
- type UnimplementedRegistryServer
- func (UnimplementedRegistryServer) Deregister(context.Context, *Item) (*EmptyResponse, error)
- func (UnimplementedRegistryServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedRegistryServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedRegistryServer) Register(context.Context, *Item) (*EmptyResponse, error)
- func (UnimplementedRegistryServer) Start(context.Context, *Item) (*EmptyResponse, error)
- func (UnimplementedRegistryServer) Stop(context.Context, *Item) (*EmptyResponse, error)
- func (UnimplementedRegistryServer) Watch(*WatchRequest, Registry_WatchServer) error
- type UnsafeRegistryServer
- type Value
- func (*Value) Descriptor() ([]byte, []int)deprecated
- func (x *Value) GetName() string
- func (x *Value) GetType() string
- func (x *Value) GetValues() []*Value
- func (*Value) ProtoMessage()
- func (x *Value) ProtoReflect() protoreflect.Message
- func (x *Value) Reset()
- func (x *Value) String() string
- func (this *Value) Validate() error
- type WatchRequest
- func (*WatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WatchRequest) GetName() string
- func (x *WatchRequest) GetOptions() *Options
- func (*WatchRequest) ProtoMessage()
- func (x *WatchRequest) ProtoReflect() protoreflect.Message
- func (x *WatchRequest) Reset()
- func (x *WatchRequest) String() string
- func (this *WatchRequest) Validate() error
Constants ¶
This section is empty.
Variables ¶
var ( ItemType_name = map[int32]string{ 0: "ALL", 1: "SERVICE", 2: "NODE", } ItemType_value = map[string]int32{ "ALL": 0, "SERVICE": 1, "NODE": 2, } )
Enum value maps for ItemType.
var ( ActionType_name = map[int32]string{ 0: "ANY", 1: "FULL_DIFF", 2: "FULL_LIST", 3: "CREATE", 4: "UPDATE", 5: "DELETE", } ActionType_value = map[string]int32{ "ANY": 0, "FULL_DIFF": 1, "FULL_LIST": 2, "CREATE": 3, "UPDATE": 4, "DELETE": 5, } )
Enum value maps for ActionType.
var ( EventType_name = map[int32]string{ 0: "Create", 1: "Delete", 2: "Update", } EventType_value = map[string]int32{ "Create": 0, "Delete": 1, "Update": 2, } )
Enum value maps for EventType.
var File_cells_registry_proto protoreflect.FileDescriptor
var Registry_ServiceDesc = grpc.ServiceDesc{ ServiceName: "registry.Registry", HandlerType: (*RegistryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Start", Handler: _Registry_Start_Handler, }, { MethodName: "Stop", Handler: _Registry_Stop_Handler, }, { MethodName: "Get", Handler: _Registry_Get_Handler, }, { MethodName: "Register", Handler: _Registry_Register_Handler, }, { MethodName: "Deregister", Handler: _Registry_Deregister_Handler, }, { MethodName: "List", Handler: _Registry_List_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Watch", Handler: _Registry_Watch_Handler, ServerStreams: true, }, }, Metadata: "cells-registry.proto", }
Registry_ServiceDesc is the grpc.ServiceDesc for Registry service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func DeregisterRegistryEnhancedServer ¶
func DeregisterRegistryEnhancedServer(s grpc.ServiceRegistrar, name string)
func RegisterRegistryEnhancedServer ¶
func RegisterRegistryEnhancedServer(s grpc.ServiceRegistrar, srv NamedRegistryServer)
func RegisterRegistryServer ¶
func RegisterRegistryServer(s grpc.ServiceRegistrar, srv RegistryServer)
Types ¶
type ActionType ¶ added in v4.0.1
type ActionType int32
const ( ActionType_ANY ActionType = 0 ActionType_FULL_DIFF ActionType = 1 ActionType_FULL_LIST ActionType = 2 ActionType_CREATE ActionType = 3 ActionType_UPDATE ActionType = 4 ActionType_DELETE ActionType = 5 )
func (ActionType) Descriptor ¶ added in v4.0.1
func (ActionType) Descriptor() protoreflect.EnumDescriptor
func (ActionType) Enum ¶ added in v4.0.1
func (x ActionType) Enum() *ActionType
func (ActionType) EnumDescriptor
deprecated
added in
v4.0.1
func (ActionType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ActionType.Descriptor instead.
func (ActionType) Number ¶ added in v4.0.1
func (x ActionType) Number() protoreflect.EnumNumber
func (ActionType) String ¶ added in v4.0.1
func (x ActionType) String() string
func (ActionType) Type ¶ added in v4.0.1
func (ActionType) Type() protoreflect.EnumType
type EmptyResponse ¶
type EmptyResponse struct {
// contains filtered or unexported fields
}
func (*EmptyResponse) Descriptor
deprecated
func (*EmptyResponse) Descriptor() ([]byte, []int)
Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead.
func (*EmptyResponse) ProtoMessage ¶
func (*EmptyResponse) ProtoMessage()
func (*EmptyResponse) ProtoReflect ¶
func (x *EmptyResponse) ProtoReflect() protoreflect.Message
func (*EmptyResponse) Reset ¶
func (x *EmptyResponse) Reset()
func (*EmptyResponse) String ¶
func (x *EmptyResponse) String() string
func (*EmptyResponse) Validate ¶
func (this *EmptyResponse) Validate() error
type Endpoint ¶
type Endpoint struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Request *Value `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` Response *Value `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
Endpoint is a endpoint provided by a service
func (*Endpoint) Descriptor
deprecated
func (*Endpoint) GetMetadata ¶
func (*Endpoint) GetRequest ¶
func (*Endpoint) GetResponse ¶
func (*Endpoint) ProtoMessage ¶
func (*Endpoint) ProtoMessage()
func (*Endpoint) ProtoReflect ¶
func (x *Endpoint) ProtoReflect() protoreflect.Message
type Event ¶
type Event struct { // Event Id Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // type of event Type EventType `protobuf:"varint,2,opt,name=type,proto3,enum=registry.EventType" json:"type,omitempty"` // unix timestamp of event Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // item entry Item *Item `protobuf:"bytes,4,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
Event is registry event
func (*Event) Descriptor
deprecated
func (*Event) GetTimestamp ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type EventType ¶
type EventType int32
EventType defines the type of event
func (EventType) Descriptor ¶
func (EventType) Descriptor() protoreflect.EnumDescriptor
func (EventType) EnumDescriptor
deprecated
func (EventType) Number ¶
func (x EventType) Number() protoreflect.EnumNumber
func (EventType) Type ¶
func (EventType) Type() protoreflect.EnumType
type GetRequest ¶
type GetRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetName ¶
func (x *GetRequest) GetName() string
func (*GetRequest) GetOptions ¶
func (x *GetRequest) GetOptions() *Options
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
func (*GetRequest) Validate ¶
func (this *GetRequest) Validate() error
type GetResponse ¶
type GetResponse struct { Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetItem ¶
func (x *GetResponse) GetItem() *Item
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
func (*GetResponse) Validate ¶
func (this *GetResponse) Validate() error
type Item ¶
type Item struct { // Types that are assignable to Item: // *Item_Service // *Item_Node Item isItem_Item `protobuf_oneof:"item"` // contains filtered or unexported fields }
func (*Item) Descriptor
deprecated
func (*Item) GetService ¶
func (*Item) ProtoMessage ¶
func (*Item) ProtoMessage()
func (*Item) ProtoReflect ¶
func (x *Item) ProtoReflect() protoreflect.Message
type ItemMap ¶ added in v4.0.1
type ItemMap struct { Items map[string]*Item `` /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ItemMap) Descriptor
deprecated
added in
v4.0.1
func (*ItemMap) ProtoMessage ¶ added in v4.0.1
func (*ItemMap) ProtoMessage()
func (*ItemMap) ProtoReflect ¶ added in v4.0.1
func (x *ItemMap) ProtoReflect() protoreflect.Message
type ItemType ¶
type ItemType int32
func (ItemType) Descriptor ¶
func (ItemType) Descriptor() protoreflect.EnumDescriptor
func (ItemType) EnumDescriptor
deprecated
func (ItemType) Number ¶
func (x ItemType) Number() protoreflect.EnumNumber
func (ItemType) Type ¶
func (ItemType) Type() protoreflect.EnumType
type Item_Node ¶
type Item_Node struct {
Node *Node `protobuf:"bytes,2,opt,name=node,proto3,oneof"`
}
type Item_Service ¶
type Item_Service struct {
Service *Service `protobuf:"bytes,1,opt,name=service,proto3,oneof"`
}
type ListRequest ¶
type ListRequest struct { Options *Options `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetOptions ¶
func (x *ListRequest) GetOptions() *Options
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 (this *ListRequest) Validate() error
type ListResponse ¶
type ListResponse struct { Items []*Item `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetItems ¶
func (x *ListResponse) GetItems() []*Item
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
func (*ListResponse) Validate ¶
func (this *ListResponse) Validate() error
type NamedRegistryServer ¶
type NamedRegistryServer interface { RegistryServer Name() string }
type Node ¶
type Node struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Address []string `protobuf:"bytes,3,rep,name=address,proto3" json:"address,omitempty"` Port int64 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ Endpoints []string `protobuf:"bytes,6,rep,name=endpoints,proto3" json:"endpoints,omitempty"` // contains filtered or unexported fields }
Node represents the node the service is on
func (*Node) Descriptor
deprecated
func (*Node) GetAddress ¶
func (*Node) GetEndpoints ¶
func (*Node) GetMetadata ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
type Options ¶
type Options struct { Ttl int64 `protobuf:"varint,1,opt,name=ttl,proto3" json:"ttl,omitempty"` Type ItemType `protobuf:"varint,2,opt,name=type,proto3,enum=registry.ItemType" json:"type,omitempty"` Action ActionType `protobuf:"varint,3,opt,name=action,proto3,enum=registry.ActionType" json:"action,omitempty"` // contains filtered or unexported fields }
Options are registry options
func (*Options) Descriptor
deprecated
func (*Options) GetAction ¶
func (x *Options) GetAction() ActionType
func (*Options) ProtoMessage ¶
func (*Options) ProtoMessage()
func (*Options) ProtoReflect ¶
func (x *Options) ProtoReflect() protoreflect.Message
type RegistryClient ¶
type RegistryClient interface { Start(ctx context.Context, in *Item, opts ...grpc.CallOption) (*EmptyResponse, error) Stop(ctx context.Context, in *Item, opts ...grpc.CallOption) (*EmptyResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Register(ctx context.Context, in *Item, opts ...grpc.CallOption) (*EmptyResponse, error) Deregister(ctx context.Context, in *Item, opts ...grpc.CallOption) (*EmptyResponse, error) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) Watch(ctx context.Context, in *WatchRequest, 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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewRegistryClient ¶
func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient
type RegistryEnhancedServer ¶
type RegistryEnhancedServer map[string]NamedRegistryServer
func (RegistryEnhancedServer) Deregister ¶
func (m RegistryEnhancedServer) Deregister(ctx context.Context, r *Item) (*EmptyResponse, error)
func (RegistryEnhancedServer) Get ¶
func (m RegistryEnhancedServer) Get(ctx context.Context, r *GetRequest) (*GetResponse, error)
func (RegistryEnhancedServer) List ¶
func (m RegistryEnhancedServer) List(ctx context.Context, r *ListRequest) (*ListResponse, error)
func (RegistryEnhancedServer) Register ¶
func (m RegistryEnhancedServer) Register(ctx context.Context, r *Item) (*EmptyResponse, error)
func (RegistryEnhancedServer) Start ¶
func (m RegistryEnhancedServer) Start(ctx context.Context, r *Item) (*EmptyResponse, error)
func (RegistryEnhancedServer) Stop ¶
func (m RegistryEnhancedServer) Stop(ctx context.Context, r *Item) (*EmptyResponse, error)
func (RegistryEnhancedServer) Watch ¶
func (m RegistryEnhancedServer) Watch(r *WatchRequest, s Registry_WatchServer) error
type RegistryServer ¶
type RegistryServer interface { Start(context.Context, *Item) (*EmptyResponse, error) Stop(context.Context, *Item) (*EmptyResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) Register(context.Context, *Item) (*EmptyResponse, error) Deregister(context.Context, *Item) (*EmptyResponse, error) List(context.Context, *ListRequest) (*ListResponse, error) Watch(*WatchRequest, Registry_WatchServer) error // contains filtered or unexported methods }
RegistryServer is the server API for Registry service. All implementations must embed UnimplementedRegistryServer for forward compatibility
type RegistryStub ¶
type RegistryStub struct {
RegistryServer
}
func (*RegistryStub) Invoke ¶
func (s *RegistryStub) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error
func (*RegistryStub) NewStream ¶
func (s *RegistryStub) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error)
type RegistryStub_WatchStreamer ¶
type RegistryStub_WatchStreamer struct {
stubs.ClientServerStreamerCore
}
func (*RegistryStub_WatchStreamer) Send ¶
func (s *RegistryStub_WatchStreamer) Send(response *Result) error
type Registry_WatchClient ¶
type Registry_WatchClient interface { Recv() (*Result, error) grpc.ClientStream }
type Registry_WatchServer ¶
type Registry_WatchServer interface { Send(*Result) error grpc.ServerStream }
type Result ¶
type Result struct { Action ActionType `protobuf:"varint,1,opt,name=action,proto3,enum=registry.ActionType" json:"action,omitempty"` // create, update, delete Items []*Item `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // unix timestamp // contains filtered or unexported fields }
Result is returns by the watcher
func (*Result) Descriptor
deprecated
func (*Result) GetAction ¶
func (x *Result) GetAction() ActionType
func (*Result) GetTimestamp ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type Service ¶
type Service struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ Nodes []*Node `protobuf:"bytes,5,rep,name=nodes,proto3" json:"nodes,omitempty"` Options *Options `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
Service represents a go-micro service
func (*Service) Descriptor
deprecated
func (*Service) GetMetadata ¶
func (*Service) GetOptions ¶
func (*Service) GetVersion ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) ProtoReflect ¶
func (x *Service) ProtoReflect() protoreflect.Message
type StartRequest ¶
type StartRequest struct { Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*StartRequest) Descriptor
deprecated
func (*StartRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartRequest.ProtoReflect.Descriptor instead.
func (*StartRequest) GetItem ¶
func (x *StartRequest) GetItem() *Item
func (*StartRequest) ProtoMessage ¶
func (*StartRequest) ProtoMessage()
func (*StartRequest) ProtoReflect ¶
func (x *StartRequest) ProtoReflect() protoreflect.Message
func (*StartRequest) Reset ¶
func (x *StartRequest) Reset()
func (*StartRequest) String ¶
func (x *StartRequest) String() string
func (*StartRequest) Validate ¶
func (this *StartRequest) Validate() error
type StopRequest ¶
type StopRequest struct { Item *Item `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` // contains filtered or unexported fields }
func (*StopRequest) Descriptor
deprecated
func (*StopRequest) Descriptor() ([]byte, []int)
Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.
func (*StopRequest) GetItem ¶
func (x *StopRequest) GetItem() *Item
func (*StopRequest) ProtoMessage ¶
func (*StopRequest) ProtoMessage()
func (*StopRequest) ProtoReflect ¶
func (x *StopRequest) ProtoReflect() protoreflect.Message
func (*StopRequest) Reset ¶
func (x *StopRequest) Reset()
func (*StopRequest) String ¶
func (x *StopRequest) String() string
func (*StopRequest) Validate ¶
func (this *StopRequest) Validate() error
type UnimplementedRegistryServer ¶
type UnimplementedRegistryServer struct { }
UnimplementedRegistryServer must be embedded to have forward compatible implementations.
func (UnimplementedRegistryServer) Deregister ¶
func (UnimplementedRegistryServer) Deregister(context.Context, *Item) (*EmptyResponse, error)
func (UnimplementedRegistryServer) Get ¶
func (UnimplementedRegistryServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedRegistryServer) List ¶
func (UnimplementedRegistryServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedRegistryServer) Register ¶
func (UnimplementedRegistryServer) Register(context.Context, *Item) (*EmptyResponse, error)
func (UnimplementedRegistryServer) Start ¶
func (UnimplementedRegistryServer) Start(context.Context, *Item) (*EmptyResponse, error)
func (UnimplementedRegistryServer) Stop ¶
func (UnimplementedRegistryServer) Stop(context.Context, *Item) (*EmptyResponse, error)
func (UnimplementedRegistryServer) Watch ¶
func (UnimplementedRegistryServer) Watch(*WatchRequest, Registry_WatchServer) error
type UnsafeRegistryServer ¶
type UnsafeRegistryServer interface {
// contains filtered or unexported methods
}
UnsafeRegistryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RegistryServer will result in compilation errors.
type Value ¶
type Value struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Values []*Value `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
Value is an opaque value for a request or response
func (*Value) Descriptor
deprecated
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message
type WatchRequest ¶
type WatchRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` // contains filtered or unexported fields }
func (*WatchRequest) Descriptor
deprecated
func (*WatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.
func (*WatchRequest) GetName ¶
func (x *WatchRequest) GetName() string
func (*WatchRequest) GetOptions ¶
func (x *WatchRequest) GetOptions() *Options
func (*WatchRequest) ProtoMessage ¶
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) ProtoReflect ¶
func (x *WatchRequest) ProtoReflect() protoreflect.Message
func (*WatchRequest) Reset ¶
func (x *WatchRequest) Reset()
func (*WatchRequest) String ¶
func (x *WatchRequest) String() string
func (*WatchRequest) Validate ¶
func (this *WatchRequest) Validate() error