Documentation ¶
Index ¶
- func RegisterHelloServer(s *grpc.Server, srv HelloServer)
- type HelloClient
- type HelloRep
- func (*HelloRep) Descriptor() ([]byte, []int)
- func (m *HelloRep) GetRep() string
- func (*HelloRep) ProtoMessage()
- func (m *HelloRep) Reset()
- func (m *HelloRep) String() string
- func (m *HelloRep) XXX_DiscardUnknown()
- func (m *HelloRep) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloRep) XXX_Merge(src proto.Message)
- func (m *HelloRep) XXX_Size() int
- func (m *HelloRep) XXX_Unmarshal(b []byte) error
- type HelloReq
- func (*HelloReq) Descriptor() ([]byte, []int)
- func (m *HelloReq) GetReq() string
- func (*HelloReq) ProtoMessage()
- func (m *HelloReq) Reset()
- func (m *HelloReq) String() string
- func (m *HelloReq) XXX_DiscardUnknown()
- func (m *HelloReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloReq) XXX_Merge(src proto.Message)
- func (m *HelloReq) XXX_Size() int
- func (m *HelloReq) XXX_Unmarshal(b []byte) error
- type HelloServer
- 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(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*HelloRep, error) CallHello(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*HelloRep, 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 HelloRep ¶
type HelloRep struct { Rep string `protobuf:"bytes,1,opt,name=rep,proto3" json:"rep,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
响应message
func (*HelloRep) Descriptor ¶
func (*HelloRep) ProtoMessage ¶
func (*HelloRep) ProtoMessage()
func (*HelloRep) XXX_DiscardUnknown ¶
func (m *HelloRep) XXX_DiscardUnknown()
func (*HelloRep) XXX_Marshal ¶
func (*HelloRep) XXX_Unmarshal ¶
type HelloReq ¶
type HelloReq struct { Req string `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
请求message
func (*HelloReq) Descriptor ¶
func (*HelloReq) ProtoMessage ¶
func (*HelloReq) ProtoMessage()
func (*HelloReq) XXX_DiscardUnknown ¶
func (m *HelloReq) XXX_DiscardUnknown()
func (*HelloReq) XXX_Marshal ¶
func (*HelloReq) XXX_Unmarshal ¶
type HelloServer ¶
type HelloServer interface { //定义服务中的方法 SayHello(context.Context, *HelloReq) (*HelloRep, error) CallHello(context.Context, *HelloReq) (*HelloRep, error) }
HelloServer is the server API for Hello service.
type UnimplementedHelloServer ¶
type UnimplementedHelloServer struct { }
UnimplementedHelloServer can be embedded to have forward compatible implementations.
Click to show internal directories.
Click to hide internal directories.