Documentation ¶
Index ¶
- func RegisterRPCServerServer(s *grpc.Server, srv RPCServerServer)
- type Dummy
- func (*Dummy) Descriptor() ([]byte, []int)
- func (*Dummy) ProtoMessage()
- func (m *Dummy) Reset()
- func (m *Dummy) String() string
- func (m *Dummy) XXX_DiscardUnknown()
- func (m *Dummy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Dummy) XXX_Merge(src proto.Message)
- func (m *Dummy) XXX_Size() int
- func (m *Dummy) XXX_Unmarshal(b []byte) error
- type PullAckRequest
- func (*PullAckRequest) Descriptor() ([]byte, []int)
- func (m *PullAckRequest) GetClientId() string
- func (*PullAckRequest) ProtoMessage()
- func (m *PullAckRequest) Reset()
- func (m *PullAckRequest) String() string
- func (m *PullAckRequest) XXX_DiscardUnknown()
- func (m *PullAckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PullAckRequest) XXX_Merge(src proto.Message)
- func (m *PullAckRequest) XXX_Size() int
- func (m *PullAckRequest) XXX_Unmarshal(b []byte) error
- type RPCAck
- func (*RPCAck) Descriptor() ([]byte, []int)
- func (m *RPCAck) GetError() string
- func (m *RPCAck) GetMessage() string
- func (m *RPCAck) GetReqId() uint32
- func (*RPCAck) ProtoMessage()
- func (m *RPCAck) Reset()
- func (m *RPCAck) String() string
- func (m *RPCAck) XXX_DiscardUnknown()
- func (m *RPCAck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RPCAck) XXX_Merge(src proto.Message)
- func (m *RPCAck) XXX_Size() int
- func (m *RPCAck) XXX_Unmarshal(b []byte) error
- type RPCAcks
- func (*RPCAcks) Descriptor() ([]byte, []int)
- func (m *RPCAcks) GetAck() []*RPCAck
- func (*RPCAcks) ProtoMessage()
- func (m *RPCAcks) Reset()
- func (m *RPCAcks) String() string
- func (m *RPCAcks) XXX_DiscardUnknown()
- func (m *RPCAcks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RPCAcks) XXX_Merge(src proto.Message)
- func (m *RPCAcks) XXX_Size() int
- func (m *RPCAcks) XXX_Unmarshal(b []byte) error
- type RPCReply
- func (*RPCReply) Descriptor() ([]byte, []int)
- func (*RPCReply) ProtoMessage()
- func (m *RPCReply) Reset()
- func (m *RPCReply) String() string
- func (m *RPCReply) XXX_DiscardUnknown()
- func (m *RPCReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RPCReply) XXX_Merge(src proto.Message)
- func (m *RPCReply) XXX_Size() int
- func (m *RPCReply) XXX_Unmarshal(b []byte) error
- type RPCRequest
- func (*RPCRequest) Descriptor() ([]byte, []int)
- func (m *RPCRequest) GetClientId() string
- func (m *RPCRequest) GetMessage() string
- func (m *RPCRequest) GetMethod() string
- func (m *RPCRequest) GetNeedAck() bool
- func (m *RPCRequest) GetReqId() uint32
- func (*RPCRequest) ProtoMessage()
- func (m *RPCRequest) Reset()
- func (m *RPCRequest) String() string
- func (m *RPCRequest) XXX_DiscardUnknown()
- func (m *RPCRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RPCRequest) XXX_Merge(src proto.Message)
- func (m *RPCRequest) XXX_Size() int
- func (m *RPCRequest) XXX_Unmarshal(b []byte) error
- type RPCServerClient
- type RPCServerServer
- type UnimplementedRPCServerServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRPCServerServer ¶
func RegisterRPCServerServer(s *grpc.Server, srv RPCServerServer)
Types ¶
type Dummy ¶
type Dummy struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Dummy) Descriptor ¶
func (*Dummy) ProtoMessage ¶
func (*Dummy) ProtoMessage()
func (*Dummy) XXX_DiscardUnknown ¶
func (m *Dummy) XXX_DiscardUnknown()
func (*Dummy) XXX_Marshal ¶
func (*Dummy) XXX_Unmarshal ¶
type PullAckRequest ¶
type PullAckRequest struct { ClientId string `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PullAckRequest) Descriptor ¶
func (*PullAckRequest) Descriptor() ([]byte, []int)
func (*PullAckRequest) GetClientId ¶
func (m *PullAckRequest) GetClientId() string
func (*PullAckRequest) ProtoMessage ¶
func (*PullAckRequest) ProtoMessage()
func (*PullAckRequest) Reset ¶
func (m *PullAckRequest) Reset()
func (*PullAckRequest) String ¶
func (m *PullAckRequest) String() string
func (*PullAckRequest) XXX_DiscardUnknown ¶
func (m *PullAckRequest) XXX_DiscardUnknown()
func (*PullAckRequest) XXX_Marshal ¶
func (m *PullAckRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PullAckRequest) XXX_Merge ¶
func (m *PullAckRequest) XXX_Merge(src proto.Message)
func (*PullAckRequest) XXX_Size ¶
func (m *PullAckRequest) XXX_Size() int
func (*PullAckRequest) XXX_Unmarshal ¶
func (m *PullAckRequest) XXX_Unmarshal(b []byte) error
type RPCAck ¶
type RPCAck struct { ReqId uint32 `protobuf:"varint,1,opt,name=reqId,proto3" json:"reqId,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RPCAck) Descriptor ¶
func (*RPCAck) GetMessage ¶
func (*RPCAck) ProtoMessage ¶
func (*RPCAck) ProtoMessage()
func (*RPCAck) XXX_DiscardUnknown ¶
func (m *RPCAck) XXX_DiscardUnknown()
func (*RPCAck) XXX_Marshal ¶
func (*RPCAck) XXX_Unmarshal ¶
type RPCAcks ¶
type RPCAcks struct { Ack []*RPCAck `protobuf:"bytes,1,rep,name=ack,proto3" json:"ack,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RPCAcks) Descriptor ¶
func (*RPCAcks) ProtoMessage ¶
func (*RPCAcks) ProtoMessage()
func (*RPCAcks) XXX_DiscardUnknown ¶
func (m *RPCAcks) XXX_DiscardUnknown()
func (*RPCAcks) XXX_Marshal ¶
func (*RPCAcks) XXX_Unmarshal ¶
type RPCReply ¶
type RPCReply struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The normal response message
func (*RPCReply) Descriptor ¶
func (*RPCReply) ProtoMessage ¶
func (*RPCReply) ProtoMessage()
func (*RPCReply) XXX_DiscardUnknown ¶
func (m *RPCReply) XXX_DiscardUnknown()
func (*RPCReply) XXX_Marshal ¶
func (*RPCReply) XXX_Unmarshal ¶
type RPCRequest ¶
type RPCRequest struct { // 客户端id ReqId uint32 `protobuf:"varint,1,opt,name=reqId,proto3" json:"reqId,omitempty"` ClientId string `protobuf:"bytes,2,opt,name=clientId,proto3" json:"clientId,omitempty"` Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` NeedAck bool `protobuf:"varint,5,opt,name=needAck,proto3" json:"needAck,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message containing the user's name.
func (*RPCRequest) Descriptor ¶
func (*RPCRequest) Descriptor() ([]byte, []int)
func (*RPCRequest) GetClientId ¶
func (m *RPCRequest) GetClientId() string
func (*RPCRequest) GetMessage ¶
func (m *RPCRequest) GetMessage() string
func (*RPCRequest) GetMethod ¶
func (m *RPCRequest) GetMethod() string
func (*RPCRequest) GetNeedAck ¶
func (m *RPCRequest) GetNeedAck() bool
func (*RPCRequest) GetReqId ¶
func (m *RPCRequest) GetReqId() uint32
func (*RPCRequest) ProtoMessage ¶
func (*RPCRequest) ProtoMessage()
func (*RPCRequest) Reset ¶
func (m *RPCRequest) Reset()
func (*RPCRequest) String ¶
func (m *RPCRequest) String() string
func (*RPCRequest) XXX_DiscardUnknown ¶
func (m *RPCRequest) XXX_DiscardUnknown()
func (*RPCRequest) XXX_Marshal ¶
func (m *RPCRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RPCRequest) XXX_Merge ¶
func (m *RPCRequest) XXX_Merge(src proto.Message)
func (*RPCRequest) XXX_Size ¶
func (m *RPCRequest) XXX_Size() int
func (*RPCRequest) XXX_Unmarshal ¶
func (m *RPCRequest) XXX_Unmarshal(b []byte) error
type RPCServerClient ¶
type RPCServerClient interface { // Sends a greeting RPC(ctx context.Context, in *RPCRequest, opts ...grpc.CallOption) (*RPCReply, error) PullAcks(ctx context.Context, in *PullAckRequest, opts ...grpc.CallOption) (*RPCAcks, error) }
RPCServerClient is the client API for RPCServer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRPCServerClient ¶
func NewRPCServerClient(cc *grpc.ClientConn) RPCServerClient
type RPCServerServer ¶
type RPCServerServer interface { // Sends a greeting RPC(context.Context, *RPCRequest) (*RPCReply, error) PullAcks(context.Context, *PullAckRequest) (*RPCAcks, error) }
RPCServerServer is the server API for RPCServer service.
type UnimplementedRPCServerServer ¶
type UnimplementedRPCServerServer struct { }
UnimplementedRPCServerServer can be embedded to have forward compatible implementations.
func (*UnimplementedRPCServerServer) PullAcks ¶
func (*UnimplementedRPCServerServer) PullAcks(ctx context.Context, req *PullAckRequest) (*RPCAcks, error)
func (*UnimplementedRPCServerServer) RPC ¶
func (*UnimplementedRPCServerServer) RPC(ctx context.Context, req *RPCRequest) (*RPCReply, error)
Click to show internal directories.
Click to hide internal directories.