Documentation
¶
Index ¶
- Variables
- func RegisterCatalogServer(s grpc.ServiceRegistrar, srv CatalogServer)
- type CatalogClient
- type CatalogServer
- type Empty
- type GetReq
- type Service
- func (*Service) Descriptor() ([]byte, []int)deprecated
- func (x *Service) GetAddress() string
- func (x *Service) GetName() string
- func (x *Service) GetSocketType() SocketType
- func (*Service) ProtoMessage()
- func (x *Service) ProtoReflect() protoreflect.Message
- func (x *Service) Reset()
- func (x *Service) String() string
- type SocketType
- type UnimplementedCatalogServer
- type UnsafeCatalogServer
Constants ¶
This section is empty.
Variables ¶
var ( SocketType_name = map[int32]string{ 0: "TCP", 1: "UNIX", } SocketType_value = map[string]int32{ "TCP": 0, "UNIX": 1, } )
Enum value maps for SocketType.
var Catalog_ServiceDesc = grpc.ServiceDesc{ ServiceName: "catalog.Catalog", HandlerType: (*CatalogServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Add", Handler: _Catalog_Add_Handler, }, { MethodName: "Get", Handler: _Catalog_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "catalog/protos/catalog.proto", }
Catalog_ServiceDesc is the grpc.ServiceDesc for Catalog service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_catalog_protos_catalog_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCatalogServer ¶
func RegisterCatalogServer(s grpc.ServiceRegistrar, srv CatalogServer)
Types ¶
type CatalogClient ¶
type CatalogClient interface {
Add(ctx context.Context, in *Service, opts ...grpc.CallOption) (*Empty, error)
Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Service, error)
}
CatalogClient is the client API for Catalog 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 NewCatalogClient ¶
func NewCatalogClient(cc grpc.ClientConnInterface) CatalogClient
type CatalogServer ¶
type CatalogServer interface {
Add(context.Context, *Service) (*Empty, error)
Get(context.Context, *GetReq) (*Service, error)
// contains filtered or unexported methods
}
CatalogServer is the server API for Catalog service. All implementations must embed UnimplementedCatalogServer for forward compatibility
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GetReq ¶
type GetReq struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*GetReq) Descriptor
deprecated
func (*GetReq) ProtoMessage ¶
func (*GetReq) ProtoMessage()
func (*GetReq) ProtoReflect ¶
func (x *GetReq) 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"`
SocketType SocketType `protobuf:"varint,3,opt,name=socket_type,json=socketType,proto3,enum=catalog.SocketType" json:"socket_type,omitempty"`
// contains filtered or unexported fields
}
func (*Service) Descriptor
deprecated
func (*Service) GetAddress ¶
func (*Service) GetSocketType ¶
func (x *Service) GetSocketType() SocketType
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) ProtoReflect ¶
func (x *Service) ProtoReflect() protoreflect.Message
type SocketType ¶
type SocketType int32
const ( SocketType_TCP SocketType = 0 SocketType_UNIX SocketType = 1 )
func (SocketType) Descriptor ¶
func (SocketType) Descriptor() protoreflect.EnumDescriptor
func (SocketType) Enum ¶
func (x SocketType) Enum() *SocketType
func (SocketType) EnumDescriptor
deprecated
func (SocketType) EnumDescriptor() ([]byte, []int)
Deprecated: Use SocketType.Descriptor instead.
func (SocketType) Number ¶
func (x SocketType) Number() protoreflect.EnumNumber
func (SocketType) String ¶
func (x SocketType) String() string
func (SocketType) Type ¶
func (SocketType) Type() protoreflect.EnumType
type UnimplementedCatalogServer ¶
type UnimplementedCatalogServer struct {
}
UnimplementedCatalogServer must be embedded to have forward compatible implementations.
type UnsafeCatalogServer ¶
type UnsafeCatalogServer interface {
// contains filtered or unexported methods
}
UnsafeCatalogServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CatalogServer will result in compilation errors.