Documentation ¶
Index ¶
- Variables
- func RegisterCommonServer(s grpc.ServiceRegistrar, srv CommonServer)
- type CommonClient
- type CommonServer
- type Common_ListFeatureClient
- type Common_ListFeatureServer
- type JsonReply
- func (*JsonReply) Descriptor() ([]byte, []int)deprecated
- func (x *JsonReply) GetData() []byte
- func (x *JsonReply) GetSeqID() uint64
- func (x *JsonReply) GetTraceID() uint64
- func (*JsonReply) ProtoMessage()
- func (x *JsonReply) ProtoReflect() protoreflect.Message
- func (x *JsonReply) Reset()
- func (x *JsonReply) String() string
- type JsonRequest
- func (*JsonRequest) Descriptor() ([]byte, []int)deprecated
- func (x *JsonRequest) GetData() []byte
- func (x *JsonRequest) GetPath() string
- func (x *JsonRequest) GetSeqID() uint64
- func (x *JsonRequest) GetTraceID() uint64
- func (*JsonRequest) ProtoMessage()
- func (x *JsonRequest) ProtoReflect() protoreflect.Message
- func (x *JsonRequest) Reset()
- func (x *JsonRequest) String() string
- type SimpleReply
- func (*SimpleReply) Descriptor() ([]byte, []int)deprecated
- func (x *SimpleReply) GetCmd() uint32
- func (x *SimpleReply) GetCode() uint32
- func (x *SimpleReply) GetData() []byte
- func (x *SimpleReply) GetSeqID() uint64
- func (x *SimpleReply) GetTraceID() uint64
- func (*SimpleReply) ProtoMessage()
- func (x *SimpleReply) ProtoReflect() protoreflect.Message
- func (x *SimpleReply) Reset()
- func (x *SimpleReply) String() string
- type SimpleRequest
- func (*SimpleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SimpleRequest) GetCmd() uint32
- func (x *SimpleRequest) GetData() []byte
- func (x *SimpleRequest) GetIpAddr() string
- func (x *SimpleRequest) GetNode() string
- func (x *SimpleRequest) GetSeqID() uint64
- func (x *SimpleRequest) GetSocketID() uint32
- func (x *SimpleRequest) GetTraceID() uint64
- func (*SimpleRequest) ProtoMessage()
- func (x *SimpleRequest) ProtoReflect() protoreflect.Message
- func (x *SimpleRequest) Reset()
- func (x *SimpleRequest) String() string
- type UnimplementedCommonServer
- type UnsafeCommonServer
Constants ¶
This section is empty.
Variables ¶
var Common_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.Common", HandlerType: (*CommonServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SocketFeature", Handler: _Common_SocketFeature_Handler, }, { MethodName: "JSONFeature", Handler: _Common_JSONFeature_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListFeature", Handler: _Common_ListFeature_Handler, ServerStreams: true, }, }, Metadata: "example.proto", }
Common_ServiceDesc is the grpc.ServiceDesc for Common service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_example_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCommonServer ¶
func RegisterCommonServer(s grpc.ServiceRegistrar, srv CommonServer)
Types ¶
type CommonClient ¶
type CommonClient interface { SocketFeature(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleReply, error) ListFeature(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (Common_ListFeatureClient, error) JSONFeature(ctx context.Context, in *JsonRequest, opts ...grpc.CallOption) (*JsonReply, error) }
CommonClient is the client API for Common 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 NewCommonClient ¶
func NewCommonClient(cc grpc.ClientConnInterface) CommonClient
type CommonServer ¶
type CommonServer interface { SocketFeature(context.Context, *SimpleRequest) (*SimpleReply, error) ListFeature(*SimpleRequest, Common_ListFeatureServer) error JSONFeature(context.Context, *JsonRequest) (*JsonReply, error) // contains filtered or unexported methods }
CommonServer is the server API for Common service. All implementations must embed UnimplementedCommonServer for forward compatibility
type Common_ListFeatureClient ¶
type Common_ListFeatureClient interface { Recv() (*SimpleReply, error) grpc.ClientStream }
type Common_ListFeatureServer ¶
type Common_ListFeatureServer interface { Send(*SimpleReply) error grpc.ServerStream }
type JsonReply ¶
type JsonReply struct { TraceID uint64 `protobuf:"varint,1,opt,name=traceID,proto3" json:"traceID,omitempty"` SeqID uint64 `protobuf:"varint,2,opt,name=seqID,proto3" json:"seqID,omitempty"` Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*JsonReply) Descriptor
deprecated
func (*JsonReply) GetTraceID ¶
func (*JsonReply) ProtoMessage ¶
func (*JsonReply) ProtoMessage()
func (*JsonReply) ProtoReflect ¶
func (x *JsonReply) ProtoReflect() protoreflect.Message
type JsonRequest ¶
type JsonRequest struct { TraceID uint64 `protobuf:"varint,1,opt,name=traceID,proto3" json:"traceID,omitempty"` SeqID uint64 `protobuf:"varint,2,opt,name=seqID,proto3" json:"seqID,omitempty"` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*JsonRequest) Descriptor
deprecated
func (*JsonRequest) Descriptor() ([]byte, []int)
Deprecated: Use JsonRequest.ProtoReflect.Descriptor instead.
func (*JsonRequest) GetData ¶
func (x *JsonRequest) GetData() []byte
func (*JsonRequest) GetPath ¶
func (x *JsonRequest) GetPath() string
func (*JsonRequest) GetSeqID ¶
func (x *JsonRequest) GetSeqID() uint64
func (*JsonRequest) GetTraceID ¶
func (x *JsonRequest) GetTraceID() uint64
func (*JsonRequest) ProtoMessage ¶
func (*JsonRequest) ProtoMessage()
func (*JsonRequest) ProtoReflect ¶
func (x *JsonRequest) ProtoReflect() protoreflect.Message
func (*JsonRequest) Reset ¶
func (x *JsonRequest) Reset()
func (*JsonRequest) String ¶
func (x *JsonRequest) String() string
type SimpleReply ¶
type SimpleReply struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` TraceID uint64 `protobuf:"varint,2,opt,name=traceID,proto3" json:"traceID,omitempty"` SeqID uint64 `protobuf:"varint,3,opt,name=seqID,proto3" json:"seqID,omitempty"` Cmd uint32 `protobuf:"varint,4,opt,name=cmd,proto3" json:"cmd,omitempty"` Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*SimpleReply) Descriptor
deprecated
func (*SimpleReply) Descriptor() ([]byte, []int)
Deprecated: Use SimpleReply.ProtoReflect.Descriptor instead.
func (*SimpleReply) GetCmd ¶
func (x *SimpleReply) GetCmd() uint32
func (*SimpleReply) GetCode ¶
func (x *SimpleReply) GetCode() uint32
func (*SimpleReply) GetData ¶
func (x *SimpleReply) GetData() []byte
func (*SimpleReply) GetSeqID ¶
func (x *SimpleReply) GetSeqID() uint64
func (*SimpleReply) GetTraceID ¶
func (x *SimpleReply) GetTraceID() uint64
func (*SimpleReply) ProtoMessage ¶
func (*SimpleReply) ProtoMessage()
func (*SimpleReply) ProtoReflect ¶
func (x *SimpleReply) ProtoReflect() protoreflect.Message
func (*SimpleReply) Reset ¶
func (x *SimpleReply) Reset()
func (*SimpleReply) String ¶
func (x *SimpleReply) String() string
type SimpleRequest ¶
type SimpleRequest struct { Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` SocketID uint32 `protobuf:"varint,2,opt,name=socketID,proto3" json:"socketID,omitempty"` IpAddr string `protobuf:"bytes,3,opt,name=ipAddr,proto3" json:"ipAddr,omitempty"` TraceID uint64 `protobuf:"varint,4,opt,name=traceID,proto3" json:"traceID,omitempty"` SeqID uint64 `protobuf:"varint,5,opt,name=seqID,proto3" json:"seqID,omitempty"` Cmd uint32 `protobuf:"varint,6,opt,name=cmd,proto3" json:"cmd,omitempty"` Data []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*SimpleRequest) Descriptor
deprecated
func (*SimpleRequest) Descriptor() ([]byte, []int)
Deprecated: Use SimpleRequest.ProtoReflect.Descriptor instead.
func (*SimpleRequest) GetCmd ¶
func (x *SimpleRequest) GetCmd() uint32
func (*SimpleRequest) GetData ¶
func (x *SimpleRequest) GetData() []byte
func (*SimpleRequest) GetIpAddr ¶
func (x *SimpleRequest) GetIpAddr() string
func (*SimpleRequest) GetNode ¶
func (x *SimpleRequest) GetNode() string
func (*SimpleRequest) GetSeqID ¶
func (x *SimpleRequest) GetSeqID() uint64
func (*SimpleRequest) GetSocketID ¶
func (x *SimpleRequest) GetSocketID() uint32
func (*SimpleRequest) GetTraceID ¶
func (x *SimpleRequest) GetTraceID() uint64
func (*SimpleRequest) ProtoMessage ¶
func (*SimpleRequest) ProtoMessage()
func (*SimpleRequest) ProtoReflect ¶
func (x *SimpleRequest) ProtoReflect() protoreflect.Message
func (*SimpleRequest) Reset ¶
func (x *SimpleRequest) Reset()
func (*SimpleRequest) String ¶
func (x *SimpleRequest) String() string
type UnimplementedCommonServer ¶
type UnimplementedCommonServer struct { }
UnimplementedCommonServer must be embedded to have forward compatible implementations.
func (UnimplementedCommonServer) JSONFeature ¶
func (UnimplementedCommonServer) JSONFeature(context.Context, *JsonRequest) (*JsonReply, error)
func (UnimplementedCommonServer) ListFeature ¶
func (UnimplementedCommonServer) ListFeature(*SimpleRequest, Common_ListFeatureServer) error
func (UnimplementedCommonServer) SocketFeature ¶
func (UnimplementedCommonServer) SocketFeature(context.Context, *SimpleRequest) (*SimpleReply, error)
type UnsafeCommonServer ¶
type UnsafeCommonServer interface {
// contains filtered or unexported methods
}
UnsafeCommonServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommonServer will result in compilation errors.