// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 // protoc v3.14.0 // source: registry.proto package registry import ( context "context" _ "github.com/envoyproxy/protoc-gen-validate/validate" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type ServiceKind int32 const ( ServiceKind_UNDEFINED_DO_NOT_USE ServiceKind = 0 // databroker grpc service ServiceKind_DATABROKER ServiceKind = 1 // authorize grpc service ServiceKind_AUTHORIZE ServiceKind = 2 // authentication http(s) service ServiceKind_AUTHENTICATE ServiceKind = 3 // proxy service ServiceKind_PROXY ServiceKind = 4 // registry service ServiceKind_REGISTRY ServiceKind = 5 // console grpc service ServiceKind_CONSOLE ServiceKind = 6 // prometheus metrics compatible http endpoint ServiceKind_PROMETHEUS_METRICS ServiceKind = 7 ) // Enum value maps for ServiceKind. var ( ServiceKind_name = map[int32]string{ 0: "UNDEFINED_DO_NOT_USE", 1: "DATABROKER", 2: "AUTHORIZE", 3: "AUTHENTICATE", 4: "PROXY", 5: "REGISTRY", 6: "CONSOLE", 7: "PROMETHEUS_METRICS", } ServiceKind_value = map[string]int32{ "UNDEFINED_DO_NOT_USE": 0, "DATABROKER": 1, "AUTHORIZE": 2, "AUTHENTICATE": 3, "PROXY": 4, "REGISTRY": 5, "CONSOLE": 6, "PROMETHEUS_METRICS": 7, } ) func (x ServiceKind) Enum() *ServiceKind { p := new(ServiceKind) *p = x return p } func (x ServiceKind) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (ServiceKind) Descriptor() protoreflect.EnumDescriptor { return file_registry_proto_enumTypes[0].Descriptor() } func (ServiceKind) Type() protoreflect.EnumType { return &file_registry_proto_enumTypes[0] } func (x ServiceKind) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use ServiceKind.Descriptor instead. func (ServiceKind) EnumDescriptor() ([]byte, []int) { return file_registry_proto_rawDescGZIP(), []int{0} } type Service struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // kind is service kind Kind ServiceKind `protobuf:"varint,1,opt,name=kind,proto3,enum=registry.ServiceKind" json:"kind,omitempty"` // network endpoints this service may be reachable at Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"` } func (x *Service) Reset() { *x = Service{} if protoimpl.UnsafeEnabled { mi := &file_registry_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Service) String() string { return protoimpl.X.MessageStringOf(x) } func (*Service) ProtoMessage() {} func (x *Service) ProtoReflect() protoreflect.Message { mi := &file_registry_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Service.ProtoReflect.Descriptor instead. func (*Service) Descriptor() ([]byte, []int) { return file_registry_proto_rawDescGZIP(), []int{0} } func (x *Service) GetKind() ServiceKind { if x != nil { return x.Kind } return ServiceKind_UNDEFINED_DO_NOT_USE } func (x *Service) GetEndpoint() string { if x != nil { return x.Endpoint } return "" } type RegisterRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // services this deployment runs Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` // service may optionally provide certain metadata, such as // - build version // - startup time // - bootstrap configuration // - OS, OS version, OS hostname // - etc // this information is not distributed back to the inquiring nodes // and may also have a different storage and time to live Metadata map[string]*anypb.Any `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *RegisterRequest) Reset() { *x = RegisterRequest{} if protoimpl.UnsafeEnabled { mi := &file_registry_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RegisterRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*RegisterRequest) ProtoMessage() {} func (x *RegisterRequest) ProtoReflect() protoreflect.Message { mi := &file_registry_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead. func (*RegisterRequest) Descriptor() ([]byte, []int) { return file_registry_proto_rawDescGZIP(), []int{1} } func (x *RegisterRequest) GetServices() []*Service { if x != nil { return x.Services } return nil } func (x *RegisterRequest) GetMetadata() map[string]*anypb.Any { if x != nil { return x.Metadata } return nil } type RegisterResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // indicates when to report back again CallBackAfter *durationpb.Duration `protobuf:"bytes,2,opt,name=call_back_after,json=callBackAfter,proto3" json:"call_back_after,omitempty"` } func (x *RegisterResponse) Reset() { *x = RegisterResponse{} if protoimpl.UnsafeEnabled { mi := &file_registry_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *RegisterResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*RegisterResponse) ProtoMessage() {} func (x *RegisterResponse) ProtoReflect() protoreflect.Message { mi := &file_registry_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead. func (*RegisterResponse) Descriptor() ([]byte, []int) { return file_registry_proto_rawDescGZIP(), []int{2} } func (x *RegisterResponse) GetCallBackAfter() *durationpb.Duration { if x != nil { return x.CallBackAfter } return nil } type ListRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Kinds []ServiceKind `protobuf:"varint,1,rep,packed,name=kinds,proto3,enum=registry.ServiceKind" json:"kinds,omitempty"` } func (x *ListRequest) Reset() { *x = ListRequest{} if protoimpl.UnsafeEnabled { mi := &file_registry_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ListRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ListRequest) ProtoMessage() {} func (x *ListRequest) ProtoReflect() protoreflect.Message { mi := &file_registry_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. func (*ListRequest) Descriptor() ([]byte, []int) { return file_registry_proto_rawDescGZIP(), []int{3} } func (x *ListRequest) GetKinds() []ServiceKind { if x != nil { return x.Kinds } return nil } type ServiceRegistration struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` } func (x *ServiceRegistration) Reset() { *x = ServiceRegistration{} if protoimpl.UnsafeEnabled { mi := &file_registry_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ServiceRegistration) String() string { return protoimpl.X.MessageStringOf(x) } func (*ServiceRegistration) ProtoMessage() {} func (x *ServiceRegistration) ProtoReflect() protoreflect.Message { mi := &file_registry_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ServiceRegistration.ProtoReflect.Descriptor instead. func (*ServiceRegistration) Descriptor() ([]byte, []int) { return file_registry_proto_rawDescGZIP(), []int{4} } func (x *ServiceRegistration) GetService() *Service { if x != nil { return x.Service } return nil } func (x *ServiceRegistration) GetExpiresAt() *timestamppb.Timestamp { if x != nil { return x.ExpiresAt } return nil } // RegistrationSnapshot represents the current state of the services type ServiceList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` } func (x *ServiceList) Reset() { *x = ServiceList{} if protoimpl.UnsafeEnabled { mi := &file_registry_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *ServiceList) String() string { return protoimpl.X.MessageStringOf(x) } func (*ServiceList) ProtoMessage() {} func (x *ServiceList) ProtoReflect() protoreflect.Message { mi := &file_registry_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use ServiceList.ProtoReflect.Descriptor instead. func (*ServiceList) Descriptor() ([]byte, []int) { return file_registry_proto_rawDescGZIP(), []int{5} } func (x *ServiceList) GetServices() []*Service { if x != nil { return x.Services } return nil } var File_registry_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, 0x12, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x64, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x20, 0x00, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x24, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x88, 0x01, 0x01, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xe2, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x43, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x51, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x55, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0f, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x61, 0x6c, 0x6c, 0x42, 0x61, 0x63, 0x6b, 0x41, 0x66, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x05, 0x6b, 0x69, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x05, 0x6b, 0x69, 0x6e, 0x64, 0x73, 0x22, 0x7d, 0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x22, 0x3c, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2a, 0x96, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x5f, 0x44, 0x4f, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x55, 0x53, 0x45, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x41, 0x54, 0x41, 0x42, 0x52, 0x4f, 0x4b, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x54, 0x48, 0x4f, 0x52, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x45, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x58, 0x59, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x52, 0x59, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x4f, 0x4e, 0x53, 0x4f, 0x4c, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52, 0x4f, 0x4d, 0x45, 0x54, 0x48, 0x45, 0x55, 0x53, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x53, 0x10, 0x07, 0x32, 0xba, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12, 0x3f, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x19, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68, 0x12, 0x15, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x30, 0x01, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x6f, 0x6d, 0x65, 0x72, 0x69, 0x75, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_registry_proto_rawDescOnce sync.Once file_registry_proto_rawDescData = file_registry_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) }) return file_registry_proto_rawDescData } var file_registry_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_registry_proto_goTypes = []interface{}{ (ServiceKind)(0), // 0: registry.ServiceKind (*Service)(nil), // 1: registry.Service (*RegisterRequest)(nil), // 2: registry.RegisterRequest (*RegisterResponse)(nil), // 3: registry.RegisterResponse (*ListRequest)(nil), // 4: registry.ListRequest (*ServiceRegistration)(nil), // 5: registry.ServiceRegistration (*ServiceList)(nil), // 6: registry.ServiceList nil, // 7: registry.RegisterRequest.MetadataEntry (*durationpb.Duration)(nil), // 8: google.protobuf.Duration (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp (*anypb.Any)(nil), // 10: google.protobuf.Any } var file_registry_proto_depIdxs = []int32{ 0, // 0: registry.Service.kind:type_name -> registry.ServiceKind 1, // 1: registry.RegisterRequest.services:type_name -> registry.Service 7, // 2: registry.RegisterRequest.metadata:type_name -> registry.RegisterRequest.MetadataEntry 8, // 3: registry.RegisterResponse.call_back_after:type_name -> google.protobuf.Duration 0, // 4: registry.ListRequest.kinds:type_name -> registry.ServiceKind 1, // 5: registry.ServiceRegistration.service:type_name -> registry.Service 9, // 6: registry.ServiceRegistration.expires_at:type_name -> google.protobuf.Timestamp 1, // 7: registry.ServiceList.services:type_name -> registry.Service 10, // 8: registry.RegisterRequest.MetadataEntry.value:type_name -> google.protobuf.Any 2, // 9: registry.Registry.Report:input_type -> registry.RegisterRequest 4, // 10: registry.Registry.List:input_type -> registry.ListRequest 4, // 11: registry.Registry.Watch:input_type -> registry.ListRequest 3, // 12: registry.Registry.Report:output_type -> registry.RegisterResponse 6, // 13: registry.Registry.List:output_type -> registry.ServiceList 6, // 14: registry.Registry.Watch:output_type -> registry.ServiceList 12, // [12:15] is the sub-list for method output_type 9, // [9:12] is the sub-list for method input_type 9, // [9:9] is the sub-list for extension type_name 9, // [9:9] is the sub-list for extension extendee 0, // [0:9] is the sub-list for field type_name } func init() { file_registry_proto_init() } func file_registry_proto_init() { if File_registry_proto != nil { return } if !protoimpl.UnsafeEnabled { file_registry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Service); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_registry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegisterRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_registry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RegisterResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_registry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_registry_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServiceRegistration); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_registry_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServiceList); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_registry_proto_rawDesc, NumEnums: 1, NumMessages: 7, NumExtensions: 0, NumServices: 1, }, GoTypes: file_registry_proto_goTypes, DependencyIndexes: file_registry_proto_depIdxs, EnumInfos: file_registry_proto_enumTypes, MessageInfos: file_registry_proto_msgTypes, }.Build() File_registry_proto = out.File file_registry_proto_rawDesc = nil file_registry_proto_goTypes = nil file_registry_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion6 // RegistryClient is the client API for Registry service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type RegistryClient interface { // Report is periodically sent by each service to confirm it is still serving // with the registry data is persisted with a certain TTL Report(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) // List returns current snapshot of the services known to the registry List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ServiceList, error) // Watch returns a stream of updates // for the simplicity of consumer its delivered as full snapshots // and is only sent when change is detected Watch(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Registry_WatchClient, error) } type registryClient struct { cc grpc.ClientConnInterface } func NewRegistryClient(cc grpc.ClientConnInterface) RegistryClient { return ®istryClient{cc} } func (c *registryClient) Report(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) { out := new(RegisterResponse) err := c.cc.Invoke(ctx, "/registry.Registry/Report", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *registryClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ServiceList, error) { out := new(ServiceList) err := c.cc.Invoke(ctx, "/registry.Registry/List", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *registryClient) Watch(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Registry_WatchClient, error) { stream, err := c.cc.NewStream(ctx, &_Registry_serviceDesc.Streams[0], "/registry.Registry/Watch", opts...) if err != nil { return nil, err } x := ®istryWatchClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } if err := x.ClientStream.CloseSend(); err != nil { return nil, err } return x, nil } type Registry_WatchClient interface { Recv() (*ServiceList, error) grpc.ClientStream } type registryWatchClient struct { grpc.ClientStream } func (x *registryWatchClient) Recv() (*ServiceList, error) { m := new(ServiceList) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } return m, nil } // RegistryServer is the server API for Registry service. type RegistryServer interface { // Report is periodically sent by each service to confirm it is still serving // with the registry data is persisted with a certain TTL Report(context.Context, *RegisterRequest) (*RegisterResponse, error) // List returns current snapshot of the services known to the registry List(context.Context, *ListRequest) (*ServiceList, error) // Watch returns a stream of updates // for the simplicity of consumer its delivered as full snapshots // and is only sent when change is detected Watch(*ListRequest, Registry_WatchServer) error } // UnimplementedRegistryServer can be embedded to have forward compatible implementations. type UnimplementedRegistryServer struct { } func (*UnimplementedRegistryServer) Report(context.Context, *RegisterRequest) (*RegisterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Report not implemented") } func (*UnimplementedRegistryServer) List(context.Context, *ListRequest) (*ServiceList, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } func (*UnimplementedRegistryServer) Watch(*ListRequest, Registry_WatchServer) error { return status.Errorf(codes.Unimplemented, "method Watch not implemented") } func RegisterRegistryServer(s *grpc.Server, srv RegistryServer) { s.RegisterService(&_Registry_serviceDesc, srv) } func _Registry_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RegisterRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RegistryServer).Report(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/registry.Registry/Report", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RegistryServer).Report(ctx, req.(*RegisterRequest)) } return interceptor(ctx, in, info, handler) } func _Registry_List_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).List(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/registry.Registry/List", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RegistryServer).List(ctx, req.(*ListRequest)) } return interceptor(ctx, in, info, handler) } func _Registry_Watch_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(ListRequest) if err := stream.RecvMsg(m); err != nil { return err } return srv.(RegistryServer).Watch(m, ®istryWatchServer{stream}) } type Registry_WatchServer interface { Send(*ServiceList) error grpc.ServerStream } type registryWatchServer struct { grpc.ServerStream } func (x *registryWatchServer) Send(m *ServiceList) error { return x.ServerStream.SendMsg(m) } var _Registry_serviceDesc = grpc.ServiceDesc{ ServiceName: "registry.Registry", HandlerType: (*RegistryServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Report", Handler: _Registry_Report_Handler, }, { MethodName: "List", Handler: _Registry_List_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Watch", Handler: _Registry_Watch_Handler, ServerStreams: true, }, }, Metadata: "registry.proto", }