Documentation ¶
Index ¶
- func RegisterHelloServer(s *grpc.Server, srv HelloServer)
- type HelloClient
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)
- func (m *HelloRequest) GetName() string
- func (*HelloRequest) ProtoMessage()
- func (m *HelloRequest) Reset()
- func (m *HelloRequest) String() string
- func (m *HelloRequest) XXX_DiscardUnknown()
- func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloRequest) XXX_Merge(src proto.Message)
- func (m *HelloRequest) XXX_Size() int
- func (m *HelloRequest) XXX_Unmarshal(b []byte) error
- type HelloResponse
- func (*HelloResponse) Descriptor() ([]byte, []int)
- func (m *HelloResponse) GetMessage() string
- func (*HelloResponse) ProtoMessage()
- func (m *HelloResponse) Reset()
- func (m *HelloResponse) String() string
- func (m *HelloResponse) XXX_DiscardUnknown()
- func (m *HelloResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloResponse) XXX_Merge(src proto.Message)
- func (m *HelloResponse) XXX_Size() int
- func (m *HelloResponse) XXX_Unmarshal(b []byte) error
- type HelloServer
- type Hello_LotsOfRepliesClient
- type Hello_LotsOfRepliesServer
- type UnimplementedHelloServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHelloServer ¶
func RegisterHelloServer(s *grpc.Server, srv HelloServer)
Types ¶
type HelloClient ¶
type HelloClient interface { // 定义 SayHello 方法 SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) // 定义 LotsOfReplies 方法 LotsOfReplies(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (Hello_LotsOfRepliesClient, error) }
HelloClient is the client API for Hello service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewHelloClient ¶
func NewHelloClient(cc *grpc.ClientConn) HelloClient
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
HelloRequest 请求结构
func (*HelloRequest) Descriptor ¶
func (*HelloRequest) Descriptor() ([]byte, []int)
func (*HelloRequest) GetName ¶
func (m *HelloRequest) GetName() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) Reset ¶
func (m *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (m *HelloRequest) String() string
func (*HelloRequest) XXX_DiscardUnknown ¶
func (m *HelloRequest) XXX_DiscardUnknown()
func (*HelloRequest) XXX_Marshal ¶
func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HelloRequest) XXX_Merge ¶
func (m *HelloRequest) XXX_Merge(src proto.Message)
func (*HelloRequest) XXX_Size ¶
func (m *HelloRequest) XXX_Size() int
func (*HelloRequest) XXX_Unmarshal ¶
func (m *HelloRequest) XXX_Unmarshal(b []byte) error
type HelloResponse ¶
type HelloResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
HelloResponse 响应结构
func (*HelloResponse) Descriptor ¶
func (*HelloResponse) Descriptor() ([]byte, []int)
func (*HelloResponse) GetMessage ¶
func (m *HelloResponse) GetMessage() string
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) Reset ¶
func (m *HelloResponse) Reset()
func (*HelloResponse) String ¶
func (m *HelloResponse) String() string
func (*HelloResponse) XXX_DiscardUnknown ¶
func (m *HelloResponse) XXX_DiscardUnknown()
func (*HelloResponse) XXX_Marshal ¶
func (m *HelloResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HelloResponse) XXX_Merge ¶
func (m *HelloResponse) XXX_Merge(src proto.Message)
func (*HelloResponse) XXX_Size ¶
func (m *HelloResponse) XXX_Size() int
func (*HelloResponse) XXX_Unmarshal ¶
func (m *HelloResponse) XXX_Unmarshal(b []byte) error
type HelloServer ¶
type HelloServer interface { // 定义 SayHello 方法 SayHello(context.Context, *HelloRequest) (*HelloResponse, error) // 定义 LotsOfReplies 方法 LotsOfReplies(*HelloRequest, Hello_LotsOfRepliesServer) error }
HelloServer is the server API for Hello service.
type Hello_LotsOfRepliesClient ¶
type Hello_LotsOfRepliesClient interface { Recv() (*HelloResponse, error) grpc.ClientStream }
type Hello_LotsOfRepliesServer ¶
type Hello_LotsOfRepliesServer interface { Send(*HelloResponse) error grpc.ServerStream }
type UnimplementedHelloServer ¶
type UnimplementedHelloServer struct { }
UnimplementedHelloServer can be embedded to have forward compatible implementations.
func (*UnimplementedHelloServer) LotsOfReplies ¶
func (*UnimplementedHelloServer) LotsOfReplies(req *HelloRequest, srv Hello_LotsOfRepliesServer) error
func (*UnimplementedHelloServer) SayHello ¶
func (*UnimplementedHelloServer) SayHello(ctx context.Context, req *HelloRequest) (*HelloResponse, error)
Click to show internal directories.
Click to hide internal directories.