update for latest micro
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.6.1
|
||||
// source: registry.proto
|
||||
// source: register.proto
|
||||
|
||||
package service
|
||||
|
||||
@@ -59,11 +59,11 @@ func (x EventType) String() string {
|
||||
}
|
||||
|
||||
func (EventType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_registry_proto_enumTypes[0].Descriptor()
|
||||
return file_register_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (EventType) Type() protoreflect.EnumType {
|
||||
return &file_registry_proto_enumTypes[0]
|
||||
return &file_register_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x EventType) Number() protoreflect.EnumNumber {
|
||||
@@ -72,7 +72,7 @@ func (x EventType) Number() protoreflect.EnumNumber {
|
||||
|
||||
// Deprecated: Use EventType.Descriptor instead.
|
||||
func (EventType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{0}
|
||||
return file_register_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// Service represents a go-micro service
|
||||
@@ -92,7 +92,7 @@ type Service struct {
|
||||
func (x *Service) Reset() {
|
||||
*x = Service{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[0]
|
||||
mi := &file_register_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -105,7 +105,7 @@ func (x *Service) String() string {
|
||||
func (*Service) ProtoMessage() {}
|
||||
|
||||
func (x *Service) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[0]
|
||||
mi := &file_register_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -118,7 +118,7 @@ func (x *Service) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Service.ProtoReflect.Descriptor instead.
|
||||
func (*Service) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{0}
|
||||
return file_register_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Service) GetName() string {
|
||||
@@ -178,7 +178,7 @@ type Node struct {
|
||||
func (x *Node) Reset() {
|
||||
*x = Node{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[1]
|
||||
mi := &file_register_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -191,7 +191,7 @@ func (x *Node) String() string {
|
||||
func (*Node) ProtoMessage() {}
|
||||
|
||||
func (x *Node) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[1]
|
||||
mi := &file_register_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -204,7 +204,7 @@ func (x *Node) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Node.ProtoReflect.Descriptor instead.
|
||||
func (*Node) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{1}
|
||||
return file_register_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Node) GetId() string {
|
||||
@@ -250,7 +250,7 @@ type Endpoint struct {
|
||||
func (x *Endpoint) Reset() {
|
||||
*x = Endpoint{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[2]
|
||||
mi := &file_register_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -263,7 +263,7 @@ func (x *Endpoint) String() string {
|
||||
func (*Endpoint) ProtoMessage() {}
|
||||
|
||||
func (x *Endpoint) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[2]
|
||||
mi := &file_register_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -276,7 +276,7 @@ func (x *Endpoint) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Endpoint.ProtoReflect.Descriptor instead.
|
||||
func (*Endpoint) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{2}
|
||||
return file_register_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *Endpoint) GetName() string {
|
||||
@@ -321,7 +321,7 @@ type Value struct {
|
||||
func (x *Value) Reset() {
|
||||
*x = Value{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[3]
|
||||
mi := &file_register_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -334,7 +334,7 @@ func (x *Value) String() string {
|
||||
func (*Value) ProtoMessage() {}
|
||||
|
||||
func (x *Value) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[3]
|
||||
mi := &file_register_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -347,7 +347,7 @@ func (x *Value) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Value.ProtoReflect.Descriptor instead.
|
||||
func (*Value) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{3}
|
||||
return file_register_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *Value) GetName() string {
|
||||
@@ -384,7 +384,7 @@ type Options struct {
|
||||
func (x *Options) Reset() {
|
||||
*x = Options{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[4]
|
||||
mi := &file_register_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -397,7 +397,7 @@ func (x *Options) String() string {
|
||||
func (*Options) ProtoMessage() {}
|
||||
|
||||
func (x *Options) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[4]
|
||||
mi := &file_register_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -410,7 +410,7 @@ func (x *Options) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Options.ProtoReflect.Descriptor instead.
|
||||
func (*Options) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{4}
|
||||
return file_register_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *Options) GetTtl() int64 {
|
||||
@@ -441,7 +441,7 @@ type Result struct {
|
||||
func (x *Result) Reset() {
|
||||
*x = Result{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[5]
|
||||
mi := &file_register_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -454,7 +454,7 @@ func (x *Result) String() string {
|
||||
func (*Result) ProtoMessage() {}
|
||||
|
||||
func (x *Result) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[5]
|
||||
mi := &file_register_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -467,7 +467,7 @@ func (x *Result) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Result.ProtoReflect.Descriptor instead.
|
||||
func (*Result) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{5}
|
||||
return file_register_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *Result) GetAction() string {
|
||||
@@ -500,7 +500,7 @@ type EmptyResponse struct {
|
||||
func (x *EmptyResponse) Reset() {
|
||||
*x = EmptyResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[6]
|
||||
mi := &file_register_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -513,7 +513,7 @@ func (x *EmptyResponse) String() string {
|
||||
func (*EmptyResponse) ProtoMessage() {}
|
||||
|
||||
func (x *EmptyResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[6]
|
||||
mi := &file_register_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -526,10 +526,10 @@ func (x *EmptyResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead.
|
||||
func (*EmptyResponse) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{6}
|
||||
return file_register_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
type GetRequest struct {
|
||||
type LookupRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -538,23 +538,23 @@ type GetRequest struct {
|
||||
Options *Options `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetRequest) Reset() {
|
||||
*x = GetRequest{}
|
||||
func (x *LookupRequest) Reset() {
|
||||
*x = LookupRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[7]
|
||||
mi := &file_register_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetRequest) String() string {
|
||||
func (x *LookupRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetRequest) ProtoMessage() {}
|
||||
func (*LookupRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[7]
|
||||
func (x *LookupRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_register_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -565,26 +565,26 @@ func (x *GetRequest) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetRequest) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{7}
|
||||
// Deprecated: Use LookupRequest.ProtoReflect.Descriptor instead.
|
||||
func (*LookupRequest) Descriptor() ([]byte, []int) {
|
||||
return file_register_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
func (x *GetRequest) GetService() string {
|
||||
func (x *LookupRequest) GetService() string {
|
||||
if x != nil {
|
||||
return x.Service
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetRequest) GetOptions() *Options {
|
||||
func (x *LookupRequest) GetOptions() *Options {
|
||||
if x != nil {
|
||||
return x.Options
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetResponse struct {
|
||||
type LookupResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@@ -592,23 +592,23 @@ type GetResponse struct {
|
||||
Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetResponse) Reset() {
|
||||
*x = GetResponse{}
|
||||
func (x *LookupResponse) Reset() {
|
||||
*x = LookupResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[8]
|
||||
mi := &file_register_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetResponse) String() string {
|
||||
func (x *LookupResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetResponse) ProtoMessage() {}
|
||||
func (*LookupResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[8]
|
||||
func (x *LookupResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_register_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -619,12 +619,12 @@ func (x *GetResponse) ProtoReflect() protoreflect.Message {
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetResponse) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{8}
|
||||
// Deprecated: Use LookupResponse.ProtoReflect.Descriptor instead.
|
||||
func (*LookupResponse) Descriptor() ([]byte, []int) {
|
||||
return file_register_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *GetResponse) GetServices() []*Service {
|
||||
func (x *LookupResponse) GetServices() []*Service {
|
||||
if x != nil {
|
||||
return x.Services
|
||||
}
|
||||
@@ -642,7 +642,7 @@ type ListRequest struct {
|
||||
func (x *ListRequest) Reset() {
|
||||
*x = ListRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[9]
|
||||
mi := &file_register_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -655,7 +655,7 @@ func (x *ListRequest) String() string {
|
||||
func (*ListRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[9]
|
||||
mi := &file_register_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -668,7 +668,7 @@ func (x *ListRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListRequest) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{9}
|
||||
return file_register_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *ListRequest) GetOptions() *Options {
|
||||
@@ -689,7 +689,7 @@ type ListResponse struct {
|
||||
func (x *ListResponse) Reset() {
|
||||
*x = ListResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[10]
|
||||
mi := &file_register_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -702,7 +702,7 @@ func (x *ListResponse) String() string {
|
||||
func (*ListResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[10]
|
||||
mi := &file_register_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -715,7 +715,7 @@ func (x *ListResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListResponse) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{10}
|
||||
return file_register_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *ListResponse) GetServices() []*Service {
|
||||
@@ -738,7 +738,7 @@ type WatchRequest struct {
|
||||
func (x *WatchRequest) Reset() {
|
||||
*x = WatchRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[11]
|
||||
mi := &file_register_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -751,7 +751,7 @@ func (x *WatchRequest) String() string {
|
||||
func (*WatchRequest) ProtoMessage() {}
|
||||
|
||||
func (x *WatchRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[11]
|
||||
mi := &file_register_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -764,7 +764,7 @@ func (x *WatchRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.
|
||||
func (*WatchRequest) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{11}
|
||||
return file_register_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *WatchRequest) GetService() string {
|
||||
@@ -800,7 +800,7 @@ type Event struct {
|
||||
func (x *Event) Reset() {
|
||||
*x = Event{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_registry_proto_msgTypes[12]
|
||||
mi := &file_register_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -813,7 +813,7 @@ func (x *Event) String() string {
|
||||
func (*Event) ProtoMessage() {}
|
||||
|
||||
func (x *Event) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_registry_proto_msgTypes[12]
|
||||
mi := &file_register_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -826,7 +826,7 @@ func (x *Event) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use Event.ProtoReflect.Descriptor instead.
|
||||
func (*Event) Descriptor() ([]byte, []int) {
|
||||
return file_registry_proto_rawDescGZIP(), []int{12}
|
||||
return file_register_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *Event) GetId() string {
|
||||
@@ -857,10 +857,10 @@ func (x *Event) GetService() *Service {
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_registry_proto protoreflect.FileDescriptor
|
||||
var File_register_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_registry_proto_rawDesc = []byte{
|
||||
0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
var file_register_proto_rawDesc = []byte{
|
||||
0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x12, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0xb2, 0x02, 0x0a, 0x07, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
|
||||
@@ -924,100 +924,101 @@ var file_registry_proto_rawDesc = []byte{
|
||||
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x0f, 0x0a, 0x0d, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
||||
0x2a, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3b, 0x0a, 0x0b, 0x47,
|
||||
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x39, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x22, 0x3c, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x73, 0x22, 0x54, 0x0a, 0x0c, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x6f,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07,
|
||||
0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x12, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54,
|
||||
0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2a, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x2a, 0x2f, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
|
||||
0x12, 0x0a, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x10, 0x02, 0x32, 0xab, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
|
||||
0x79, 0x12, 0x39, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
||||
0x13, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x08,
|
||||
0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0a, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
|
||||
0x65, 0x72, 0x12, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45,
|
||||
0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d,
|
||||
0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x14,
|
||||
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a,
|
||||
0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00,
|
||||
0x30, 0x01, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69,
|
||||
0x63, 0x72, 0x6f, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2d, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x0a, 0x0d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75,
|
||||
0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3e,
|
||||
0x0a, 0x0e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x39,
|
||||
0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a,
|
||||
0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
|
||||
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3c, 0x0a, 0x0c, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x54, 0x0a, 0x0c, 0x57, 0x61, 0x74, 0x63, 0x68,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x12, 0x2a, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4f, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x89, 0x01,
|
||||
0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
|
||||
0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2a, 0x0a,
|
||||
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
|
||||
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2a, 0x2f, 0x0a, 0x09, 0x45, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x01, 0x12, 0x0a,
|
||||
0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x10, 0x02, 0x32, 0xb4, 0x02, 0x0a, 0x08, 0x52,
|
||||
0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0d, 0x4c, 0x6f, 0x6f, 0x6b, 0x75,
|
||||
0x70, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x17, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75,
|
||||
0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x08, 0x52,
|
||||
0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x0a, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
|
||||
0x72, 0x12, 0x10, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x45, 0x6d,
|
||||
0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a,
|
||||
0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x14, 0x2e,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x05,
|
||||
0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
|
||||
0x57, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x30,
|
||||
0x01, 0x42, 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63,
|
||||
0x72, 0x6f, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2d, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_registry_proto_rawDescOnce sync.Once
|
||||
file_registry_proto_rawDescData = file_registry_proto_rawDesc
|
||||
file_register_proto_rawDescOnce sync.Once
|
||||
file_register_proto_rawDescData = file_register_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_registry_proto_rawDescGZIP() []byte {
|
||||
file_registry_proto_rawDescOnce.Do(func() {
|
||||
file_registry_proto_rawDescData = protoimpl.X.CompressGZIP(file_registry_proto_rawDescData)
|
||||
func file_register_proto_rawDescGZIP() []byte {
|
||||
file_register_proto_rawDescOnce.Do(func() {
|
||||
file_register_proto_rawDescData = protoimpl.X.CompressGZIP(file_register_proto_rawDescData)
|
||||
})
|
||||
return file_registry_proto_rawDescData
|
||||
return file_register_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_registry_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
||||
var file_registry_proto_goTypes = []interface{}{
|
||||
(EventType)(0), // 0: service.EventType
|
||||
(*Service)(nil), // 1: service.Service
|
||||
(*Node)(nil), // 2: service.Node
|
||||
(*Endpoint)(nil), // 3: service.Endpoint
|
||||
(*Value)(nil), // 4: service.Value
|
||||
(*Options)(nil), // 5: service.Options
|
||||
(*Result)(nil), // 6: service.Result
|
||||
(*EmptyResponse)(nil), // 7: service.EmptyResponse
|
||||
(*GetRequest)(nil), // 8: service.GetRequest
|
||||
(*GetResponse)(nil), // 9: service.GetResponse
|
||||
(*ListRequest)(nil), // 10: service.ListRequest
|
||||
(*ListResponse)(nil), // 11: service.ListResponse
|
||||
(*WatchRequest)(nil), // 12: service.WatchRequest
|
||||
(*Event)(nil), // 13: service.Event
|
||||
nil, // 14: service.Service.MetadataEntry
|
||||
nil, // 15: service.Node.MetadataEntry
|
||||
nil, // 16: service.Endpoint.MetadataEntry
|
||||
var file_register_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_register_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
|
||||
var file_register_proto_goTypes = []interface{}{
|
||||
(EventType)(0), // 0: service.EventType
|
||||
(*Service)(nil), // 1: service.Service
|
||||
(*Node)(nil), // 2: service.Node
|
||||
(*Endpoint)(nil), // 3: service.Endpoint
|
||||
(*Value)(nil), // 4: service.Value
|
||||
(*Options)(nil), // 5: service.Options
|
||||
(*Result)(nil), // 6: service.Result
|
||||
(*EmptyResponse)(nil), // 7: service.EmptyResponse
|
||||
(*LookupRequest)(nil), // 8: service.LookupRequest
|
||||
(*LookupResponse)(nil), // 9: service.LookupResponse
|
||||
(*ListRequest)(nil), // 10: service.ListRequest
|
||||
(*ListResponse)(nil), // 11: service.ListResponse
|
||||
(*WatchRequest)(nil), // 12: service.WatchRequest
|
||||
(*Event)(nil), // 13: service.Event
|
||||
nil, // 14: service.Service.MetadataEntry
|
||||
nil, // 15: service.Node.MetadataEntry
|
||||
nil, // 16: service.Endpoint.MetadataEntry
|
||||
}
|
||||
var file_registry_proto_depIdxs = []int32{
|
||||
var file_register_proto_depIdxs = []int32{
|
||||
14, // 0: service.Service.metadata:type_name -> service.Service.MetadataEntry
|
||||
3, // 1: service.Service.endpoints:type_name -> service.Endpoint
|
||||
2, // 2: service.Service.nodes:type_name -> service.Node
|
||||
@@ -1028,23 +1029,23 @@ var file_registry_proto_depIdxs = []int32{
|
||||
16, // 7: service.Endpoint.metadata:type_name -> service.Endpoint.MetadataEntry
|
||||
4, // 8: service.Value.values:type_name -> service.Value
|
||||
1, // 9: service.Result.service:type_name -> service.Service
|
||||
5, // 10: service.GetRequest.options:type_name -> service.Options
|
||||
1, // 11: service.GetResponse.services:type_name -> service.Service
|
||||
5, // 10: service.LookupRequest.options:type_name -> service.Options
|
||||
1, // 11: service.LookupResponse.services:type_name -> service.Service
|
||||
5, // 12: service.ListRequest.options:type_name -> service.Options
|
||||
1, // 13: service.ListResponse.services:type_name -> service.Service
|
||||
5, // 14: service.WatchRequest.options:type_name -> service.Options
|
||||
0, // 15: service.Event.type:type_name -> service.EventType
|
||||
1, // 16: service.Event.service:type_name -> service.Service
|
||||
8, // 17: service.Registry.GetService:input_type -> service.GetRequest
|
||||
1, // 18: service.Registry.Register:input_type -> service.Service
|
||||
1, // 19: service.Registry.Deregister:input_type -> service.Service
|
||||
10, // 20: service.Registry.ListServices:input_type -> service.ListRequest
|
||||
12, // 21: service.Registry.Watch:input_type -> service.WatchRequest
|
||||
9, // 22: service.Registry.GetService:output_type -> service.GetResponse
|
||||
7, // 23: service.Registry.Register:output_type -> service.EmptyResponse
|
||||
7, // 24: service.Registry.Deregister:output_type -> service.EmptyResponse
|
||||
11, // 25: service.Registry.ListServices:output_type -> service.ListResponse
|
||||
6, // 26: service.Registry.Watch:output_type -> service.Result
|
||||
8, // 17: service.Register.LookupService:input_type -> service.LookupRequest
|
||||
1, // 18: service.Register.Register:input_type -> service.Service
|
||||
1, // 19: service.Register.Deregister:input_type -> service.Service
|
||||
10, // 20: service.Register.ListServices:input_type -> service.ListRequest
|
||||
12, // 21: service.Register.Watch:input_type -> service.WatchRequest
|
||||
9, // 22: service.Register.LookupService:output_type -> service.LookupResponse
|
||||
7, // 23: service.Register.Register:output_type -> service.EmptyResponse
|
||||
7, // 24: service.Register.Deregister:output_type -> service.EmptyResponse
|
||||
11, // 25: service.Register.ListServices:output_type -> service.ListResponse
|
||||
6, // 26: service.Register.Watch:output_type -> service.Result
|
||||
22, // [22:27] is the sub-list for method output_type
|
||||
17, // [17:22] is the sub-list for method input_type
|
||||
17, // [17:17] is the sub-list for extension type_name
|
||||
@@ -1052,13 +1053,13 @@ var file_registry_proto_depIdxs = []int32{
|
||||
0, // [0:17] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_registry_proto_init() }
|
||||
func file_registry_proto_init() {
|
||||
if File_registry_proto != nil {
|
||||
func init() { file_register_proto_init() }
|
||||
func file_register_proto_init() {
|
||||
if File_register_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_registry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Service); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1070,7 +1071,7 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Node); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1082,7 +1083,7 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Endpoint); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1094,7 +1095,7 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Value); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1106,7 +1107,7 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Options); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1118,7 +1119,7 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Result); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1130,7 +1131,7 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*EmptyResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1142,8 +1143,8 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetRequest); i {
|
||||
file_register_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LookupRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -1154,8 +1155,8 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetResponse); i {
|
||||
file_register_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LookupResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@@ -1166,7 +1167,7 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1178,7 +1179,7 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1190,7 +1191,7 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WatchRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1202,7 +1203,7 @@ func file_registry_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_registry_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_register_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Event); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -1219,19 +1220,19 @@ func file_registry_proto_init() {
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_registry_proto_rawDesc,
|
||||
RawDescriptor: file_register_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 16,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_registry_proto_goTypes,
|
||||
DependencyIndexes: file_registry_proto_depIdxs,
|
||||
EnumInfos: file_registry_proto_enumTypes,
|
||||
MessageInfos: file_registry_proto_msgTypes,
|
||||
GoTypes: file_register_proto_goTypes,
|
||||
DependencyIndexes: file_register_proto_depIdxs,
|
||||
EnumInfos: file_register_proto_enumTypes,
|
||||
MessageInfos: file_register_proto_msgTypes,
|
||||
}.Build()
|
||||
File_registry_proto = out.File
|
||||
file_registry_proto_rawDesc = nil
|
||||
file_registry_proto_goTypes = nil
|
||||
file_registry_proto_depIdxs = nil
|
||||
File_register_proto = out.File
|
||||
file_register_proto_rawDesc = nil
|
||||
file_register_proto_goTypes = nil
|
||||
file_register_proto_depIdxs = nil
|
||||
}
|
@@ -3,8 +3,8 @@ syntax = "proto3";
|
||||
package service;
|
||||
option go_package="github.com/unistack-org/micro-registry-service;service";
|
||||
|
||||
service Registry {
|
||||
rpc GetService(GetRequest) returns (GetResponse) {};
|
||||
service Register {
|
||||
rpc LookupService(LookupRequest) returns (LookupResponse) {};
|
||||
rpc Register(Service) returns (EmptyResponse) {};
|
||||
rpc Deregister(Service) returns (EmptyResponse) {};
|
||||
rpc ListServices(ListRequest) returns (ListResponse) {};
|
||||
@@ -59,12 +59,12 @@ message Result {
|
||||
|
||||
message EmptyResponse {}
|
||||
|
||||
message GetRequest {
|
||||
message LookupRequest {
|
||||
string service = 1;
|
||||
Options options = 2;
|
||||
}
|
||||
|
||||
message GetResponse {
|
||||
message LookupResponse {
|
||||
repeated Service services = 1;
|
||||
}
|
||||
|
@@ -13,67 +13,67 @@ import (
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
const _ = grpc.SupportPackageIsVersion6
|
||||
|
||||
// RegistryClient is the client API for Registry service.
|
||||
// RegisterClient is the client API for Register 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.
|
||||
type RegistryClient interface {
|
||||
GetService(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
|
||||
type RegisterClient interface {
|
||||
LookupService(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error)
|
||||
Register(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error)
|
||||
Deregister(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error)
|
||||
ListServices(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
|
||||
Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Registry_WatchClient, error)
|
||||
Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Register_WatchClient, error)
|
||||
}
|
||||
|
||||
type registryClient struct {
|
||||
type registerClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient {
|
||||
return ®istryClient{cc}
|
||||
func NewRegisterClient(cc grpc.ClientConnInterface) RegisterClient {
|
||||
return ®isterClient{cc}
|
||||
}
|
||||
|
||||
func (c *registryClient) GetService(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
|
||||
out := new(GetResponse)
|
||||
err := c.cc.Invoke(ctx, "/service.Registry/GetService", in, out, opts...)
|
||||
func (c *registerClient) LookupService(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error) {
|
||||
out := new(LookupResponse)
|
||||
err := c.cc.Invoke(ctx, "/service.Register/LookupService", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *registryClient) Register(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error) {
|
||||
func (c *registerClient) Register(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error) {
|
||||
out := new(EmptyResponse)
|
||||
err := c.cc.Invoke(ctx, "/service.Registry/Register", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/service.Register/Register", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *registryClient) Deregister(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error) {
|
||||
func (c *registerClient) Deregister(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error) {
|
||||
out := new(EmptyResponse)
|
||||
err := c.cc.Invoke(ctx, "/service.Registry/Deregister", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/service.Register/Deregister", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *registryClient) ListServices(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
|
||||
func (c *registerClient) ListServices(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
|
||||
out := new(ListResponse)
|
||||
err := c.cc.Invoke(ctx, "/service.Registry/ListServices", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/service.Register/ListServices", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *registryClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Registry_WatchClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Registry_serviceDesc.Streams[0], "/service.Registry/Watch", opts...)
|
||||
func (c *registerClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Register_WatchClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Register_serviceDesc.Streams[0], "/service.Register/Watch", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := ®istryWatchClient{stream}
|
||||
x := ®isterWatchClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -83,16 +83,16 @@ func (c *registryClient) Watch(ctx context.Context, in *WatchRequest, opts ...gr
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Registry_WatchClient interface {
|
||||
type Register_WatchClient interface {
|
||||
Recv() (*Result, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type registryWatchClient struct {
|
||||
type registerWatchClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *registryWatchClient) Recv() (*Result, error) {
|
||||
func (x *registerWatchClient) Recv() (*Result, error) {
|
||||
m := new(Result)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
@@ -100,163 +100,163 @@ func (x *registryWatchClient) Recv() (*Result, error) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// RegistryServer is the server API for Registry service.
|
||||
// All implementations must embed UnimplementedRegistryServer
|
||||
// RegisterServer is the server API for Register service.
|
||||
// All implementations must embed UnimplementedRegisterServer
|
||||
// for forward compatibility
|
||||
type RegistryServer interface {
|
||||
GetService(context.Context, *GetRequest) (*GetResponse, error)
|
||||
type RegisterServer interface {
|
||||
LookupService(context.Context, *LookupRequest) (*LookupResponse, error)
|
||||
Register(context.Context, *Service) (*EmptyResponse, error)
|
||||
Deregister(context.Context, *Service) (*EmptyResponse, error)
|
||||
ListServices(context.Context, *ListRequest) (*ListResponse, error)
|
||||
Watch(*WatchRequest, Registry_WatchServer) error
|
||||
mustEmbedUnimplementedRegistryServer()
|
||||
Watch(*WatchRequest, Register_WatchServer) error
|
||||
mustEmbedUnimplementedRegisterServer()
|
||||
}
|
||||
|
||||
// UnimplementedRegistryServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedRegistryServer struct {
|
||||
// UnimplementedRegisterServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedRegisterServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRegistryServer) GetService(context.Context, *GetRequest) (*GetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented")
|
||||
func (*UnimplementedRegisterServer) LookupService(context.Context, *LookupRequest) (*LookupResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method LookupService not implemented")
|
||||
}
|
||||
func (*UnimplementedRegistryServer) Register(context.Context, *Service) (*EmptyResponse, error) {
|
||||
func (*UnimplementedRegisterServer) Register(context.Context, *Service) (*EmptyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
|
||||
}
|
||||
func (*UnimplementedRegistryServer) Deregister(context.Context, *Service) (*EmptyResponse, error) {
|
||||
func (*UnimplementedRegisterServer) Deregister(context.Context, *Service) (*EmptyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Deregister not implemented")
|
||||
}
|
||||
func (*UnimplementedRegistryServer) ListServices(context.Context, *ListRequest) (*ListResponse, error) {
|
||||
func (*UnimplementedRegisterServer) ListServices(context.Context, *ListRequest) (*ListResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented")
|
||||
}
|
||||
func (*UnimplementedRegistryServer) Watch(*WatchRequest, Registry_WatchServer) error {
|
||||
func (*UnimplementedRegisterServer) Watch(*WatchRequest, Register_WatchServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Watch not implemented")
|
||||
}
|
||||
func (*UnimplementedRegistryServer) mustEmbedUnimplementedRegistryServer() {}
|
||||
func (*UnimplementedRegisterServer) mustEmbedUnimplementedRegisterServer() {}
|
||||
|
||||
func RegisterRegistryServer(s *grpc.Server, srv RegistryServer) {
|
||||
s.RegisterService(&_Registry_serviceDesc, srv)
|
||||
func RegisterRegisterServer(s *grpc.Server, srv RegisterServer) {
|
||||
s.RegisterService(&_Register_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _Registry_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetRequest)
|
||||
func _Register_LookupService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LookupRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RegistryServer).GetService(ctx, in)
|
||||
return srv.(RegisterServer).LookupService(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/service.Registry/GetService",
|
||||
FullMethod: "/service.Register/LookupService",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RegistryServer).GetService(ctx, req.(*GetRequest))
|
||||
return srv.(RegisterServer).LookupService(ctx, req.(*LookupRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Registry_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _Register_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Service)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RegistryServer).Register(ctx, in)
|
||||
return srv.(RegisterServer).Register(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/service.Registry/Register",
|
||||
FullMethod: "/service.Register/Register",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RegistryServer).Register(ctx, req.(*Service))
|
||||
return srv.(RegisterServer).Register(ctx, req.(*Service))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Registry_Deregister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _Register_Deregister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Service)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RegistryServer).Deregister(ctx, in)
|
||||
return srv.(RegisterServer).Deregister(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/service.Registry/Deregister",
|
||||
FullMethod: "/service.Register/Deregister",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RegistryServer).Deregister(ctx, req.(*Service))
|
||||
return srv.(RegisterServer).Deregister(ctx, req.(*Service))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Registry_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _Register_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RegistryServer).ListServices(ctx, in)
|
||||
return srv.(RegisterServer).ListServices(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/service.Registry/ListServices",
|
||||
FullMethod: "/service.Register/ListServices",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RegistryServer).ListServices(ctx, req.(*ListRequest))
|
||||
return srv.(RegisterServer).ListServices(ctx, req.(*ListRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Registry_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
func _Register_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(WatchRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(RegistryServer).Watch(m, ®istryWatchServer{stream})
|
||||
return srv.(RegisterServer).Watch(m, ®isterWatchServer{stream})
|
||||
}
|
||||
|
||||
type Registry_WatchServer interface {
|
||||
type Register_WatchServer interface {
|
||||
Send(*Result) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type registryWatchServer struct {
|
||||
type registerWatchServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *registryWatchServer) Send(m *Result) error {
|
||||
func (x *registerWatchServer) Send(m *Result) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
var _Registry_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "service.Registry",
|
||||
HandlerType: (*RegistryServer)(nil),
|
||||
var _Register_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "service.Register",
|
||||
HandlerType: (*RegisterServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "GetService",
|
||||
Handler: _Registry_GetService_Handler,
|
||||
MethodName: "LookupService",
|
||||
Handler: _Register_LookupService_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Register",
|
||||
Handler: _Registry_Register_Handler,
|
||||
Handler: _Register_Register_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Deregister",
|
||||
Handler: _Registry_Deregister_Handler,
|
||||
Handler: _Register_Deregister_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListServices",
|
||||
Handler: _Registry_ListServices_Handler,
|
||||
Handler: _Register_ListServices_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Watch",
|
||||
Handler: _Registry_Watch_Handler,
|
||||
Handler: _Register_Watch_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "registry.proto",
|
||||
Metadata: "register.proto",
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-micro
|
||||
// source: registry.proto
|
||||
// source: register.proto
|
||||
package service
|
||||
|
||||
import (
|
||||
@@ -10,22 +10,22 @@ import (
|
||||
micro_server "github.com/unistack-org/micro/v3/server"
|
||||
)
|
||||
|
||||
// NewRegistryEndpoints provides api endpoints metdata for Registry service
|
||||
func NewRegistryEndpoints() []*micro_api.Endpoint {
|
||||
// NewRegisterEndpoints provides api endpoints metdata for Register service
|
||||
func NewRegisterEndpoints() []*micro_api.Endpoint {
|
||||
var endpoints []*micro_api.Endpoint
|
||||
return endpoints
|
||||
}
|
||||
|
||||
// RegistryService interface
|
||||
type RegistryService interface {
|
||||
GetService(context.Context, *GetRequest, ...micro_client.CallOption) (*GetResponse, error)
|
||||
// RegisterService interface
|
||||
type RegisterService interface {
|
||||
LookupService(context.Context, *LookupRequest, ...micro_client.CallOption) (*LookupResponse, error)
|
||||
Register(context.Context, *Service, ...micro_client.CallOption) (*EmptyResponse, error)
|
||||
Deregister(context.Context, *Service, ...micro_client.CallOption) (*EmptyResponse, error)
|
||||
ListServices(context.Context, *ListRequest, ...micro_client.CallOption) (*ListResponse, error)
|
||||
Watch(context.Context, *WatchRequest, ...micro_client.CallOption) (Registry_WatchService, error)
|
||||
Watch(context.Context, *WatchRequest, ...micro_client.CallOption) (Register_WatchService, error)
|
||||
}
|
||||
|
||||
type Registry_WatchService interface {
|
||||
type Register_WatchService interface {
|
||||
Context() context.Context
|
||||
SendMsg(interface{}) error
|
||||
RecvMsg(interface{}) error
|
||||
@@ -35,35 +35,35 @@ type Registry_WatchService interface {
|
||||
|
||||
// Micro server stuff
|
||||
|
||||
// RegistryHandler server handler
|
||||
type RegistryHandler interface {
|
||||
GetService(context.Context, *GetRequest, *GetResponse) error
|
||||
// RegisterHandler server handler
|
||||
type RegisterHandler interface {
|
||||
LookupService(context.Context, *LookupRequest, *LookupResponse) error
|
||||
Register(context.Context, *Service, *EmptyResponse) error
|
||||
Deregister(context.Context, *Service, *EmptyResponse) error
|
||||
ListServices(context.Context, *ListRequest, *ListResponse) error
|
||||
Watch(context.Context, *WatchRequest, Registry_WatchStream) error
|
||||
Watch(context.Context, *WatchRequest, Register_WatchStream) error
|
||||
}
|
||||
|
||||
// RegisterRegistryHandler registers server handler
|
||||
func RegisterRegistryHandler(s micro_server.Server, sh RegistryHandler, opts ...micro_server.HandlerOption) error {
|
||||
type registry interface {
|
||||
GetService(context.Context, *GetRequest, *GetResponse) error
|
||||
// RegisterRegisterHandler registers server handler
|
||||
func RegisterRegisterHandler(s micro_server.Server, sh RegisterHandler, opts ...micro_server.HandlerOption) error {
|
||||
type register interface {
|
||||
LookupService(context.Context, *LookupRequest, *LookupResponse) error
|
||||
Register(context.Context, *Service, *EmptyResponse) error
|
||||
Deregister(context.Context, *Service, *EmptyResponse) error
|
||||
ListServices(context.Context, *ListRequest, *ListResponse) error
|
||||
Watch(context.Context, micro_server.Stream) error
|
||||
}
|
||||
type Registry struct {
|
||||
registry
|
||||
type Register struct {
|
||||
register
|
||||
}
|
||||
h := ®istryHandler{sh}
|
||||
for _, endpoint := range NewRegistryEndpoints() {
|
||||
h := ®isterHandler{sh}
|
||||
for _, endpoint := range NewRegisterEndpoints() {
|
||||
opts = append(opts, micro_api.WithEndpoint(endpoint))
|
||||
}
|
||||
return s.Handle(s.NewHandler(&Registry{h}, opts...))
|
||||
return s.Handle(s.NewHandler(&Register{h}, opts...))
|
||||
}
|
||||
|
||||
type Registry_WatchStream interface {
|
||||
type Register_WatchStream interface {
|
||||
Context() context.Context
|
||||
SendMsg(interface{}) error
|
||||
RecvMsg(interface{}) error
|
153
proto/register_micro_grpc.pb.go
Normal file
153
proto/register_micro_grpc.pb.go
Normal file
@@ -0,0 +1,153 @@
|
||||
// Code generated by protoc-gen-micro
|
||||
// source: register.proto
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
micro_client "github.com/unistack-org/micro/v3/client"
|
||||
micro_server "github.com/unistack-org/micro/v3/server"
|
||||
)
|
||||
|
||||
var (
|
||||
_ micro_server.Option
|
||||
_ micro_client.Option
|
||||
)
|
||||
|
||||
type registerService struct {
|
||||
c micro_client.Client
|
||||
name string
|
||||
}
|
||||
|
||||
// Micro client stuff
|
||||
|
||||
// NewRegisterService create new service client
|
||||
func NewRegisterService(name string, c micro_client.Client) RegisterService {
|
||||
return ®isterService{c: c, name: name}
|
||||
}
|
||||
|
||||
func (c *registerService) LookupService(ctx context.Context, req *LookupRequest, opts ...micro_client.CallOption) (*LookupResponse, error) {
|
||||
rsp := &LookupResponse{}
|
||||
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Register.LookupService", req), rsp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func (c *registerService) Register(ctx context.Context, req *Service, opts ...micro_client.CallOption) (*EmptyResponse, error) {
|
||||
rsp := &EmptyResponse{}
|
||||
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Register.Register", req), rsp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func (c *registerService) Deregister(ctx context.Context, req *Service, opts ...micro_client.CallOption) (*EmptyResponse, error) {
|
||||
rsp := &EmptyResponse{}
|
||||
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Register.Deregister", req), rsp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func (c *registerService) ListServices(ctx context.Context, req *ListRequest, opts ...micro_client.CallOption) (*ListResponse, error) {
|
||||
rsp := &ListResponse{}
|
||||
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Register.ListServices", req), rsp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func (c *registerService) Watch(ctx context.Context, req *WatchRequest, opts ...micro_client.CallOption) (Register_WatchService, error) {
|
||||
stream, err := c.c.Stream(ctx, c.c.NewRequest(c.name, "Register.Watch", &WatchRequest{}), opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := stream.Send(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ®isterServiceWatch{stream}, nil
|
||||
}
|
||||
|
||||
type registerServiceWatch struct {
|
||||
stream micro_client.Stream
|
||||
}
|
||||
|
||||
func (x *registerServiceWatch) Close() error {
|
||||
return x.stream.Close()
|
||||
}
|
||||
|
||||
func (x *registerServiceWatch) Context() context.Context {
|
||||
return x.stream.Context()
|
||||
}
|
||||
|
||||
func (x *registerServiceWatch) SendMsg(m interface{}) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
|
||||
func (x *registerServiceWatch) RecvMsg(m interface{}) error {
|
||||
return x.stream.Recv(m)
|
||||
}
|
||||
|
||||
func (x *registerServiceWatch) Recv() (*Result, error) {
|
||||
m := &Result{}
|
||||
if err := x.stream.Recv(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
} // Micro server stuff
|
||||
|
||||
type registerHandler struct {
|
||||
RegisterHandler
|
||||
}
|
||||
|
||||
func (h *registerHandler) LookupService(ctx context.Context, req *LookupRequest, rsp *LookupResponse) error {
|
||||
return h.RegisterHandler.LookupService(ctx, req, rsp)
|
||||
}
|
||||
|
||||
func (h *registerHandler) Register(ctx context.Context, req *Service, rsp *EmptyResponse) error {
|
||||
return h.RegisterHandler.Register(ctx, req, rsp)
|
||||
}
|
||||
|
||||
func (h *registerHandler) Deregister(ctx context.Context, req *Service, rsp *EmptyResponse) error {
|
||||
return h.RegisterHandler.Deregister(ctx, req, rsp)
|
||||
}
|
||||
|
||||
func (h *registerHandler) ListServices(ctx context.Context, req *ListRequest, rsp *ListResponse) error {
|
||||
return h.RegisterHandler.ListServices(ctx, req, rsp)
|
||||
}
|
||||
|
||||
func (h *registerHandler) Watch(ctx context.Context, stream micro_server.Stream) error {
|
||||
m := &WatchRequest{}
|
||||
if err := stream.Recv(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return h.RegisterHandler.Watch(ctx, m, ®isterWatchStream{stream})
|
||||
}
|
||||
|
||||
type registerWatchStream struct {
|
||||
stream micro_server.Stream
|
||||
}
|
||||
|
||||
func (x *registerWatchStream) Close() error {
|
||||
return x.stream.Close()
|
||||
}
|
||||
|
||||
func (x *registerWatchStream) Context() context.Context {
|
||||
return x.stream.Context()
|
||||
}
|
||||
|
||||
func (x *registerWatchStream) SendMsg(m interface{}) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
|
||||
func (x *registerWatchStream) RecvMsg(m interface{}) error {
|
||||
return x.stream.Recv(m)
|
||||
}
|
||||
func (x *registerWatchStream) Send(m *Result) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
@@ -1,153 +0,0 @@
|
||||
// Code generated by protoc-gen-micro
|
||||
// source: registry.proto
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
micro_client "github.com/unistack-org/micro/v3/client"
|
||||
micro_server "github.com/unistack-org/micro/v3/server"
|
||||
)
|
||||
|
||||
var (
|
||||
_ micro_server.Option
|
||||
_ micro_client.Option
|
||||
)
|
||||
|
||||
type registryService struct {
|
||||
c micro_client.Client
|
||||
name string
|
||||
}
|
||||
|
||||
// Micro client stuff
|
||||
|
||||
// NewRegistryService create new service client
|
||||
func NewRegistryService(name string, c micro_client.Client) RegistryService {
|
||||
return ®istryService{c: c, name: name}
|
||||
}
|
||||
|
||||
func (c *registryService) GetService(ctx context.Context, req *GetRequest, opts ...micro_client.CallOption) (*GetResponse, error) {
|
||||
rsp := &GetResponse{}
|
||||
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Registry.GetService", req), rsp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func (c *registryService) Register(ctx context.Context, req *Service, opts ...micro_client.CallOption) (*EmptyResponse, error) {
|
||||
rsp := &EmptyResponse{}
|
||||
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Registry.Register", req), rsp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func (c *registryService) Deregister(ctx context.Context, req *Service, opts ...micro_client.CallOption) (*EmptyResponse, error) {
|
||||
rsp := &EmptyResponse{}
|
||||
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Registry.Deregister", req), rsp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func (c *registryService) ListServices(ctx context.Context, req *ListRequest, opts ...micro_client.CallOption) (*ListResponse, error) {
|
||||
rsp := &ListResponse{}
|
||||
err := c.c.Call(ctx, c.c.NewRequest(c.name, "Registry.ListServices", req), rsp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rsp, nil
|
||||
}
|
||||
|
||||
func (c *registryService) Watch(ctx context.Context, req *WatchRequest, opts ...micro_client.CallOption) (Registry_WatchService, error) {
|
||||
stream, err := c.c.Stream(ctx, c.c.NewRequest(c.name, "Registry.Watch", &WatchRequest{}), opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := stream.Send(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ®istryServiceWatch{stream}, nil
|
||||
}
|
||||
|
||||
type registryServiceWatch struct {
|
||||
stream micro_client.Stream
|
||||
}
|
||||
|
||||
func (x *registryServiceWatch) Close() error {
|
||||
return x.stream.Close()
|
||||
}
|
||||
|
||||
func (x *registryServiceWatch) Context() context.Context {
|
||||
return x.stream.Context()
|
||||
}
|
||||
|
||||
func (x *registryServiceWatch) SendMsg(m interface{}) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
|
||||
func (x *registryServiceWatch) RecvMsg(m interface{}) error {
|
||||
return x.stream.Recv(m)
|
||||
}
|
||||
|
||||
func (x *registryServiceWatch) Recv() (*Result, error) {
|
||||
m := &Result{}
|
||||
if err := x.stream.Recv(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
} // Micro server stuff
|
||||
|
||||
type registryHandler struct {
|
||||
RegistryHandler
|
||||
}
|
||||
|
||||
func (h *registryHandler) GetService(ctx context.Context, req *GetRequest, rsp *GetResponse) error {
|
||||
return h.RegistryHandler.GetService(ctx, req, rsp)
|
||||
}
|
||||
|
||||
func (h *registryHandler) Register(ctx context.Context, req *Service, rsp *EmptyResponse) error {
|
||||
return h.RegistryHandler.Register(ctx, req, rsp)
|
||||
}
|
||||
|
||||
func (h *registryHandler) Deregister(ctx context.Context, req *Service, rsp *EmptyResponse) error {
|
||||
return h.RegistryHandler.Deregister(ctx, req, rsp)
|
||||
}
|
||||
|
||||
func (h *registryHandler) ListServices(ctx context.Context, req *ListRequest, rsp *ListResponse) error {
|
||||
return h.RegistryHandler.ListServices(ctx, req, rsp)
|
||||
}
|
||||
|
||||
func (h *registryHandler) Watch(ctx context.Context, stream micro_server.Stream) error {
|
||||
m := &WatchRequest{}
|
||||
if err := stream.Recv(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return h.RegistryHandler.Watch(ctx, m, ®istryWatchStream{stream})
|
||||
}
|
||||
|
||||
type registryWatchStream struct {
|
||||
stream micro_server.Stream
|
||||
}
|
||||
|
||||
func (x *registryWatchStream) Close() error {
|
||||
return x.stream.Close()
|
||||
}
|
||||
|
||||
func (x *registryWatchStream) Context() context.Context {
|
||||
return x.stream.Context()
|
||||
}
|
||||
|
||||
func (x *registryWatchStream) SendMsg(m interface{}) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
||||
|
||||
func (x *registryWatchStream) RecvMsg(m interface{}) error {
|
||||
return x.stream.Recv(m)
|
||||
}
|
||||
func (x *registryWatchStream) Send(m *Result) error {
|
||||
return x.stream.Send(m)
|
||||
}
|
Reference in New Issue
Block a user