Documentation
¶
Index ¶
- Variables
- func RegisterSDServer(s grpc.ServiceRegistrar, srv SDServer)
- type DeregisterReply
- type DeregisterRequest
- type GetServiceReply
- type GetServiceRequest
- type RegisterReply
- type RegisterRequest
- type RenewReply
- type RenewRequest
- type SDClient
- type SDServer
- type Service
- func (*Service) Descriptor() ([]byte, []int)deprecated
- func (x *Service) GetAddress() string
- func (x *Service) GetId() string
- func (x *Service) GetName() string
- func (x *Service) GetNetwork() string
- func (x *Service) GetNode() string
- func (*Service) ProtoMessage()
- func (x *Service) ProtoReflect() protoreflect.Message
- func (x *Service) Reset()
- func (x *Service) String() string
- type UnimplementedSDServer
- func (UnimplementedSDServer) Deregister(context.Context, *DeregisterRequest) (*DeregisterReply, error)
- func (UnimplementedSDServer) Get(context.Context, *GetServiceRequest) (*GetServiceReply, error)
- func (UnimplementedSDServer) Register(context.Context, *RegisterRequest) (*RegisterReply, error)
- func (UnimplementedSDServer) Renew(context.Context, *RenewRequest) (*RenewReply, error)
- type UnsafeSDServer
Constants ¶
This section is empty.
Variables ¶
var File_sd_proto protoreflect.FileDescriptor
var SD_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.SD", HandlerType: (*SDServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _SD_Register_Handler, }, { MethodName: "Deregister", Handler: _SD_Deregister_Handler, }, { MethodName: "Renew", Handler: _SD_Renew_Handler, }, { MethodName: "Get", Handler: _SD_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sd.proto", }
SD_ServiceDesc is the grpc.ServiceDesc for SD service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSDServer ¶
func RegisterSDServer(s grpc.ServiceRegistrar, srv SDServer)
Types ¶
type DeregisterReply ¶
type DeregisterReply struct {
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
// contains filtered or unexported fields
}
func (*DeregisterReply) Descriptor
deprecated
func (*DeregisterReply) Descriptor() ([]byte, []int)
Deprecated: Use DeregisterReply.ProtoReflect.Descriptor instead.
func (*DeregisterReply) GetOk ¶
func (x *DeregisterReply) GetOk() bool
func (*DeregisterReply) ProtoMessage ¶
func (*DeregisterReply) ProtoMessage()
func (*DeregisterReply) ProtoReflect ¶
func (x *DeregisterReply) ProtoReflect() protoreflect.Message
func (*DeregisterReply) Reset ¶
func (x *DeregisterReply) Reset()
func (*DeregisterReply) String ¶
func (x *DeregisterReply) String() string
type DeregisterRequest ¶
type DeregisterRequest struct {
Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
// contains filtered or unexported fields
}
func (*DeregisterRequest) Descriptor
deprecated
func (*DeregisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeregisterRequest.ProtoReflect.Descriptor instead.
func (*DeregisterRequest) GetService ¶
func (x *DeregisterRequest) GetService() *Service
func (*DeregisterRequest) ProtoMessage ¶
func (*DeregisterRequest) ProtoMessage()
func (*DeregisterRequest) ProtoReflect ¶
func (x *DeregisterRequest) ProtoReflect() protoreflect.Message
func (*DeregisterRequest) Reset ¶
func (x *DeregisterRequest) Reset()
func (*DeregisterRequest) String ¶
func (x *DeregisterRequest) String() string
type GetServiceReply ¶
type GetServiceReply struct {
Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
// contains filtered or unexported fields
}
func (*GetServiceReply) Descriptor
deprecated
func (*GetServiceReply) Descriptor() ([]byte, []int)
Deprecated: Use GetServiceReply.ProtoReflect.Descriptor instead.
func (*GetServiceReply) GetServices ¶
func (x *GetServiceReply) GetServices() []*Service
func (*GetServiceReply) ProtoMessage ¶
func (*GetServiceReply) ProtoMessage()
func (*GetServiceReply) ProtoReflect ¶
func (x *GetServiceReply) ProtoReflect() protoreflect.Message
func (*GetServiceReply) Reset ¶
func (x *GetServiceReply) Reset()
func (*GetServiceReply) String ¶
func (x *GetServiceReply) String() string
type GetServiceRequest ¶
type GetServiceRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*GetServiceRequest) Descriptor
deprecated
func (*GetServiceRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetServiceRequest.ProtoReflect.Descriptor instead.
func (*GetServiceRequest) GetName ¶
func (x *GetServiceRequest) GetName() string
func (*GetServiceRequest) ProtoMessage ¶
func (*GetServiceRequest) ProtoMessage()
func (*GetServiceRequest) ProtoReflect ¶
func (x *GetServiceRequest) ProtoReflect() protoreflect.Message
func (*GetServiceRequest) Reset ¶
func (x *GetServiceRequest) Reset()
func (*GetServiceRequest) String ¶
func (x *GetServiceRequest) String() string
type RegisterReply ¶
type RegisterReply struct {
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
// contains filtered or unexported fields
}
func (*RegisterReply) Descriptor
deprecated
func (*RegisterReply) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReply.ProtoReflect.Descriptor instead.
func (*RegisterReply) GetOk ¶
func (x *RegisterReply) GetOk() bool
func (*RegisterReply) ProtoMessage ¶
func (*RegisterReply) ProtoMessage()
func (*RegisterReply) ProtoReflect ¶
func (x *RegisterReply) ProtoReflect() protoreflect.Message
func (*RegisterReply) Reset ¶
func (x *RegisterReply) Reset()
func (*RegisterReply) String ¶
func (x *RegisterReply) String() string
type RegisterRequest ¶
type RegisterRequest struct {
Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
// contains filtered or unexported fields
}
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetService ¶
func (x *RegisterRequest) GetService() *Service
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RenewReply ¶
type RenewReply struct {
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
// contains filtered or unexported fields
}
func (*RenewReply) Descriptor
deprecated
func (*RenewReply) Descriptor() ([]byte, []int)
Deprecated: Use RenewReply.ProtoReflect.Descriptor instead.
func (*RenewReply) GetOk ¶
func (x *RenewReply) GetOk() bool
func (*RenewReply) ProtoMessage ¶
func (*RenewReply) ProtoMessage()
func (*RenewReply) ProtoReflect ¶
func (x *RenewReply) ProtoReflect() protoreflect.Message
func (*RenewReply) Reset ¶
func (x *RenewReply) Reset()
func (*RenewReply) String ¶
func (x *RenewReply) String() string
type RenewRequest ¶
type RenewRequest struct {
Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
// contains filtered or unexported fields
}
func (*RenewRequest) Descriptor
deprecated
func (*RenewRequest) Descriptor() ([]byte, []int)
Deprecated: Use RenewRequest.ProtoReflect.Descriptor instead.
func (*RenewRequest) GetService ¶
func (x *RenewRequest) GetService() *Service
func (*RenewRequest) ProtoMessage ¶
func (*RenewRequest) ProtoMessage()
func (*RenewRequest) ProtoReflect ¶
func (x *RenewRequest) ProtoReflect() protoreflect.Message
func (*RenewRequest) Reset ¶
func (x *RenewRequest) Reset()
func (*RenewRequest) String ¶
func (x *RenewRequest) String() string
type SDClient ¶
type SDClient interface {
Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterReply, error)
Deregister(ctx context.Context, in *DeregisterRequest, opts ...grpc.CallOption) (*DeregisterReply, error)
Renew(ctx context.Context, in *RenewRequest, opts ...grpc.CallOption) (*RenewReply, error)
Get(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*GetServiceReply, error)
}
SDClient is the client API for SD 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 NewSDClient ¶
func NewSDClient(cc grpc.ClientConnInterface) SDClient
type SDServer ¶
type SDServer interface {
Register(context.Context, *RegisterRequest) (*RegisterReply, error)
Deregister(context.Context, *DeregisterRequest) (*DeregisterReply, error)
Renew(context.Context, *RenewRequest) (*RenewReply, error)
Get(context.Context, *GetServiceRequest) (*GetServiceReply, error)
// contains filtered or unexported methods
}
SDServer is the server API for SD service. All implementations must embed UnimplementedSDServer for forward compatibility
type Service ¶
type Service struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Node string `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"`
Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"`
Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"`
// contains filtered or unexported fields
}
func (*Service) Descriptor
deprecated
func (*Service) GetAddress ¶
func (*Service) GetNetwork ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) ProtoReflect ¶
func (x *Service) ProtoReflect() protoreflect.Message
type UnimplementedSDServer ¶
type UnimplementedSDServer struct {
}
UnimplementedSDServer must be embedded to have forward compatible implementations.
func (UnimplementedSDServer) Deregister ¶
func (UnimplementedSDServer) Deregister(context.Context, *DeregisterRequest) (*DeregisterReply, error)
func (UnimplementedSDServer) Get ¶
func (UnimplementedSDServer) Get(context.Context, *GetServiceRequest) (*GetServiceReply, error)
func (UnimplementedSDServer) Register ¶
func (UnimplementedSDServer) Register(context.Context, *RegisterRequest) (*RegisterReply, error)
func (UnimplementedSDServer) Renew ¶
func (UnimplementedSDServer) Renew(context.Context, *RenewRequest) (*RenewReply, error)
type UnsafeSDServer ¶
type UnsafeSDServer interface {
// contains filtered or unexported methods
}
UnsafeSDServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SDServer will result in compilation errors.