Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterEtcdRegistrarServer(s grpc.ServiceRegistrar, srv EtcdRegistrarServer)
- type DiscoverRequest
- type DiscoverResponse
- type EtcdRegistrarClient
- type EtcdRegistrarServer
- type EtcdRegistrar_SubscribeClient
- type EtcdRegistrar_SubscribeServer
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetAddress() string
- func (x *RegisterRequest) GetLeaseTime() int64
- func (x *RegisterRequest) GetName() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterResponse
- type Reply
- type Service
- type SubscribeRequest
- type SubscribeResponse
- func (*SubscribeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeResponse) GetAddr() string
- func (x *SubscribeResponse) GetAvailable() bool
- func (*SubscribeResponse) ProtoMessage()
- func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
- func (x *SubscribeResponse) Reset()
- func (x *SubscribeResponse) String() string
- type UnimplementedEtcdRegistrarServer
- func (UnimplementedEtcdRegistrarServer) Discover(context.Context, *DiscoverRequest) (*DiscoverResponse, error)
- func (UnimplementedEtcdRegistrarServer) HeartbeatActive(context.Context, *Service) (*Reply, error)
- func (UnimplementedEtcdRegistrarServer) Logout(context.Context, *Service) (*Reply, error)
- func (UnimplementedEtcdRegistrarServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
- func (UnimplementedEtcdRegistrarServer) Subscribe(*SubscribeRequest, EtcdRegistrar_SubscribeServer) error
- type UnsafeEtcdRegistrarServer
Constants ¶
const ( EtcdRegistrar_Register_FullMethodName = "/EtcdRegistrar/Register" EtcdRegistrar_HeartbeatActive_FullMethodName = "/EtcdRegistrar/HeartbeatActive" EtcdRegistrar_Logout_FullMethodName = "/EtcdRegistrar/Logout" EtcdRegistrar_Discover_FullMethodName = "/EtcdRegistrar/Discover" EtcdRegistrar_Subscribe_FullMethodName = "/EtcdRegistrar/Subscribe" )
Variables ¶
var EtcdRegistrar_ServiceDesc = grpc.ServiceDesc{ ServiceName: "EtcdRegistrar", HandlerType: (*EtcdRegistrarServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _EtcdRegistrar_Register_Handler, }, { MethodName: "HeartbeatActive", Handler: _EtcdRegistrar_HeartbeatActive_Handler, }, { MethodName: "Logout", Handler: _EtcdRegistrar_Logout_Handler, }, { MethodName: "Discover", Handler: _EtcdRegistrar_Discover_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _EtcdRegistrar_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "registrar.proto", }
EtcdRegistrar_ServiceDesc is the grpc.ServiceDesc for EtcdRegistrar service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_registrar_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEtcdRegistrarServer ¶
func RegisterEtcdRegistrarServer(s grpc.ServiceRegistrar, srv EtcdRegistrarServer)
Types ¶
type DiscoverRequest ¶
type DiscoverRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*DiscoverRequest) Descriptor
deprecated
func (*DiscoverRequest) Descriptor() ([]byte, []int)
Deprecated: Use DiscoverRequest.ProtoReflect.Descriptor instead.
func (*DiscoverRequest) GetName ¶
func (x *DiscoverRequest) GetName() string
func (*DiscoverRequest) ProtoMessage ¶
func (*DiscoverRequest) ProtoMessage()
func (*DiscoverRequest) ProtoReflect ¶
func (x *DiscoverRequest) ProtoReflect() protoreflect.Message
func (*DiscoverRequest) Reset ¶
func (x *DiscoverRequest) Reset()
func (*DiscoverRequest) String ¶
func (x *DiscoverRequest) String() string
type DiscoverResponse ¶
type DiscoverResponse struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*DiscoverResponse) Descriptor
deprecated
func (*DiscoverResponse) Descriptor() ([]byte, []int)
Deprecated: Use DiscoverResponse.ProtoReflect.Descriptor instead.
func (*DiscoverResponse) GetAddress ¶
func (x *DiscoverResponse) GetAddress() string
func (*DiscoverResponse) ProtoMessage ¶
func (*DiscoverResponse) ProtoMessage()
func (*DiscoverResponse) ProtoReflect ¶
func (x *DiscoverResponse) ProtoReflect() protoreflect.Message
func (*DiscoverResponse) Reset ¶
func (x *DiscoverResponse) Reset()
func (*DiscoverResponse) String ¶
func (x *DiscoverResponse) String() string
type EtcdRegistrarClient ¶
type EtcdRegistrarClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) HeartbeatActive(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Reply, error) Logout(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Reply, error) Discover(ctx context.Context, in *DiscoverRequest, opts ...grpc.CallOption) (*DiscoverResponse, error) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (EtcdRegistrar_SubscribeClient, error) }
EtcdRegistrarClient is the client API for EtcdRegistrar service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEtcdRegistrarClient ¶
func NewEtcdRegistrarClient(cc grpc.ClientConnInterface) EtcdRegistrarClient
type EtcdRegistrarServer ¶
type EtcdRegistrarServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) HeartbeatActive(context.Context, *Service) (*Reply, error) Logout(context.Context, *Service) (*Reply, error) Discover(context.Context, *DiscoverRequest) (*DiscoverResponse, error) Subscribe(*SubscribeRequest, EtcdRegistrar_SubscribeServer) error // contains filtered or unexported methods }
EtcdRegistrarServer is the server API for EtcdRegistrar service. All implementations must embed UnimplementedEtcdRegistrarServer for forward compatibility
type EtcdRegistrar_SubscribeClient ¶
type EtcdRegistrar_SubscribeClient interface { Recv() (*SubscribeResponse, error) grpc.ClientStream }
type EtcdRegistrar_SubscribeServer ¶
type EtcdRegistrar_SubscribeServer interface { Send(*SubscribeResponse) error grpc.ServerStream }
type RegisterRequest ¶
type RegisterRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` LeaseTime int64 `protobuf:"varint,3,opt,name=lease_time,json=leaseTime,proto3" json:"lease_time,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetAddress ¶
func (x *RegisterRequest) GetAddress() string
func (*RegisterRequest) GetLeaseTime ¶
func (x *RegisterRequest) GetLeaseTime() int64
func (*RegisterRequest) GetName ¶
func (x *RegisterRequest) GetName() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct { ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // contains filtered or unexported fields }
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetServiceName ¶
func (x *RegisterResponse) GetServiceName() string
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type Reply ¶
type Reply struct {
// contains filtered or unexported fields
}
func (*Reply) Descriptor
deprecated
func (*Reply) ProtoMessage ¶
func (*Reply) ProtoMessage()
func (*Reply) ProtoReflect ¶
func (x *Reply) ProtoReflect() protoreflect.Message
type Service ¶
type Service struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*Service) Descriptor
deprecated
func (*Service) GetAddress ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) ProtoReflect ¶
func (x *Service) ProtoReflect() protoreflect.Message
type SubscribeRequest ¶
type SubscribeRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*SubscribeRequest) Descriptor
deprecated
func (*SubscribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) GetName ¶
func (x *SubscribeRequest) GetName() string
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) ProtoReflect ¶
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
func (*SubscribeRequest) Reset ¶
func (x *SubscribeRequest) Reset()
func (*SubscribeRequest) String ¶
func (x *SubscribeRequest) String() string
type SubscribeResponse ¶
type SubscribeResponse struct { Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"` Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` // contains filtered or unexported fields }
func (*SubscribeResponse) Descriptor
deprecated
func (*SubscribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.
func (*SubscribeResponse) GetAddr ¶
func (x *SubscribeResponse) GetAddr() string
func (*SubscribeResponse) GetAvailable ¶
func (x *SubscribeResponse) GetAvailable() bool
func (*SubscribeResponse) ProtoMessage ¶
func (*SubscribeResponse) ProtoMessage()
func (*SubscribeResponse) ProtoReflect ¶
func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
func (*SubscribeResponse) Reset ¶
func (x *SubscribeResponse) Reset()
func (*SubscribeResponse) String ¶
func (x *SubscribeResponse) String() string
type UnimplementedEtcdRegistrarServer ¶
type UnimplementedEtcdRegistrarServer struct { }
UnimplementedEtcdRegistrarServer must be embedded to have forward compatible implementations.
func (UnimplementedEtcdRegistrarServer) Discover ¶
func (UnimplementedEtcdRegistrarServer) Discover(context.Context, *DiscoverRequest) (*DiscoverResponse, error)
func (UnimplementedEtcdRegistrarServer) HeartbeatActive ¶
func (UnimplementedEtcdRegistrarServer) Register ¶
func (UnimplementedEtcdRegistrarServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
func (UnimplementedEtcdRegistrarServer) Subscribe ¶
func (UnimplementedEtcdRegistrarServer) Subscribe(*SubscribeRequest, EtcdRegistrar_SubscribeServer) error
type UnsafeEtcdRegistrarServer ¶
type UnsafeEtcdRegistrarServer interface {
// contains filtered or unexported methods
}
UnsafeEtcdRegistrarServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EtcdRegistrarServer will result in compilation errors.