Documentation ¶
Index ¶
- func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
- type GreeterClient
- type GreeterServer
- type Greeter_StreamHelloClient
- type Greeter_StreamHelloServer
- type HelloReply
- func (*HelloReply) Descriptor() ([]byte, []int)
- func (m *HelloReply) GetDone() bool
- func (m *HelloReply) GetId32() int32
- func (m *HelloReply) GetId64() int64
- func (m *HelloReply) GetIdu32() uint32
- func (m *HelloReply) GetIdu64() uint64
- func (m *HelloReply) GetMessage() string
- func (m *HelloReply) GetName() []byte
- func (*HelloReply) ProtoMessage()
- func (m *HelloReply) Reset()
- func (m *HelloReply) String() string
- func (m *HelloReply) XXX_DiscardUnknown()
- func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloReply) XXX_Merge(src proto.Message)
- func (m *HelloReply) XXX_Size() int
- func (m *HelloReply) XXX_Unmarshal(b []byte) error
- 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 WhoServerReply
- func (*WhoServerReply) Descriptor() ([]byte, []int)
- func (m *WhoServerReply) GetMessage() string
- func (*WhoServerReply) ProtoMessage()
- func (m *WhoServerReply) Reset()
- func (m *WhoServerReply) String() string
- func (m *WhoServerReply) XXX_DiscardUnknown()
- func (m *WhoServerReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WhoServerReply) XXX_Merge(src proto.Message)
- func (m *WhoServerReply) XXX_Size() int
- func (m *WhoServerReply) XXX_Unmarshal(b []byte) error
- type WhoServerReq
- func (*WhoServerReq) Descriptor() ([]byte, []int)
- func (*WhoServerReq) ProtoMessage()
- func (m *WhoServerReq) Reset()
- func (m *WhoServerReq) String() string
- func (m *WhoServerReq) XXX_DiscardUnknown()
- func (m *WhoServerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WhoServerReq) XXX_Merge(src proto.Message)
- func (m *WhoServerReq) XXX_Size() int
- func (m *WhoServerReq) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGreeterServer ¶
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
Types ¶
type GreeterClient ¶
type GreeterClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) WhoServer(ctx context.Context, in *WhoServerReq, opts ...grpc.CallOption) (*WhoServerReply, error) StreamHello(ctx context.Context, opts ...grpc.CallOption) (Greeter_StreamHelloClient, error) }
GreeterClient is the client API for Greeter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGreeterClient ¶
func NewGreeterClient(cc *grpc.ClientConn) GreeterClient
type GreeterServer ¶
type GreeterServer interface { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) WhoServer(context.Context, *WhoServerReq) (*WhoServerReply, error) StreamHello(Greeter_StreamHelloServer) error }
GreeterServer is the server API for Greeter service.
type Greeter_StreamHelloClient ¶
type Greeter_StreamHelloClient interface { Send(*HelloRequest) error Recv() (*HelloReply, error) grpc.ClientStream }
type Greeter_StreamHelloServer ¶
type Greeter_StreamHelloServer interface { Send(*HelloReply) error Recv() (*HelloRequest, error) grpc.ServerStream }
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Id64 int64 `protobuf:"varint,2,opt,name=id64,proto3" json:"id64,omitempty"` Id32 int32 `protobuf:"varint,3,opt,name=id32,proto3" json:"id32,omitempty"` Idu64 uint64 `protobuf:"varint,4,opt,name=idu64,proto3" json:"idu64,omitempty"` Idu32 uint32 `protobuf:"varint,5,opt,name=idu32,proto3" json:"idu32,omitempty"` Name []byte `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"` Done bool `protobuf:"varint,7,opt,name=done,proto3" json:"done,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message containing the greetings
func (*HelloReply) Descriptor ¶
func (*HelloReply) Descriptor() ([]byte, []int)
func (*HelloReply) GetDone ¶
func (m *HelloReply) GetDone() bool
func (*HelloReply) GetId32 ¶
func (m *HelloReply) GetId32() int32
func (*HelloReply) GetId64 ¶
func (m *HelloReply) GetId64() int64
func (*HelloReply) GetIdu32 ¶
func (m *HelloReply) GetIdu32() uint32
func (*HelloReply) GetIdu64 ¶
func (m *HelloReply) GetIdu64() uint64
func (*HelloReply) GetMessage ¶
func (m *HelloReply) GetMessage() string
func (*HelloReply) GetName ¶
func (m *HelloReply) GetName() []byte
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) Reset ¶
func (m *HelloReply) Reset()
func (*HelloReply) String ¶
func (m *HelloReply) String() string
func (*HelloReply) XXX_DiscardUnknown ¶
func (m *HelloReply) XXX_DiscardUnknown()
func (*HelloReply) XXX_Marshal ¶
func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HelloReply) XXX_Merge ¶
func (m *HelloReply) XXX_Merge(src proto.Message)
func (*HelloReply) XXX_Size ¶
func (m *HelloReply) XXX_Size() int
func (*HelloReply) XXX_Unmarshal ¶
func (m *HelloReply) XXX_Unmarshal(b []byte) error
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:"-"` }
The request message containing the user's name.
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 WhoServerReply ¶
type WhoServerReply 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:"-"` }
func (*WhoServerReply) Descriptor ¶
func (*WhoServerReply) Descriptor() ([]byte, []int)
func (*WhoServerReply) GetMessage ¶
func (m *WhoServerReply) GetMessage() string
func (*WhoServerReply) ProtoMessage ¶
func (*WhoServerReply) ProtoMessage()
func (*WhoServerReply) Reset ¶
func (m *WhoServerReply) Reset()
func (*WhoServerReply) String ¶
func (m *WhoServerReply) String() string
func (*WhoServerReply) XXX_DiscardUnknown ¶
func (m *WhoServerReply) XXX_DiscardUnknown()
func (*WhoServerReply) XXX_Marshal ¶
func (m *WhoServerReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WhoServerReply) XXX_Merge ¶
func (m *WhoServerReply) XXX_Merge(src proto.Message)
func (*WhoServerReply) XXX_Size ¶
func (m *WhoServerReply) XXX_Size() int
func (*WhoServerReply) XXX_Unmarshal ¶
func (m *WhoServerReply) XXX_Unmarshal(b []byte) error
type WhoServerReq ¶
type WhoServerReq struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WhoServerReq) Descriptor ¶
func (*WhoServerReq) Descriptor() ([]byte, []int)
func (*WhoServerReq) ProtoMessage ¶
func (*WhoServerReq) ProtoMessage()
func (*WhoServerReq) Reset ¶
func (m *WhoServerReq) Reset()
func (*WhoServerReq) String ¶
func (m *WhoServerReq) String() string
func (*WhoServerReq) XXX_DiscardUnknown ¶
func (m *WhoServerReq) XXX_DiscardUnknown()
func (*WhoServerReq) XXX_Marshal ¶
func (m *WhoServerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WhoServerReq) XXX_Merge ¶
func (m *WhoServerReq) XXX_Merge(src proto.Message)
func (*WhoServerReq) XXX_Size ¶
func (m *WhoServerReq) XXX_Size() int
func (*WhoServerReq) XXX_Unmarshal ¶
func (m *WhoServerReq) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.