Documentation ¶
Index ¶
- func RegisterMyServiceServer(s *grpc.Server, srv MyServiceServer)
- type HelloReply
- func (*HelloReply) Descriptor() ([]byte, []int)
- func (m *HelloReply) GetMessage() string
- 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) GetMessage() 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 MyServiceClient
- type MyServiceServer
- type MyService_ChatClient
- type MyService_ChatServer
- type MyService_GetStreamClient
- type MyService_GetStreamServer
- type MyService_GiveStreamClient
- type MyService_GiveStreamServer
- type UnimplementedMyServiceServer
- func (*UnimplementedMyServiceServer) Chat(srv MyService_ChatServer) error
- func (*UnimplementedMyServiceServer) CreateObject(ctx context.Context, req *HelloRequest) (*HelloReply, error)
- func (*UnimplementedMyServiceServer) GetObject(ctx context.Context, req *HelloRequest) (*HelloReply, error)
- func (*UnimplementedMyServiceServer) GetStream(req *HelloRequest, srv MyService_GetStreamServer) error
- func (*UnimplementedMyServiceServer) GiveStream(srv MyService_GiveStreamServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMyServiceServer ¶
func RegisterMyServiceServer(s *grpc.Server, srv MyServiceServer)
Types ¶
type HelloReply ¶
type HelloReply 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:"-"` }
The response message containing the greetings
func (*HelloReply) Descriptor ¶
func (*HelloReply) Descriptor() ([]byte, []int)
func (*HelloReply) GetMessage ¶
func (m *HelloReply) GetMessage() string
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 { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,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) GetMessage ¶
func (m *HelloRequest) GetMessage() 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 MyServiceClient ¶
type MyServiceClient interface { // reuqest response CreateObject(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) // reuqest response GetObject(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) // reuqest stream - server stream to client GetStream(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (MyService_GetStreamClient, error) // stream response - client stream to server GiveStream(ctx context.Context, opts ...grpc.CallOption) (MyService_GiveStreamClient, error) // bistream - live Chat(ctx context.Context, opts ...grpc.CallOption) (MyService_ChatClient, error) }
MyServiceClient is the client API for MyService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMyServiceClient ¶
func NewMyServiceClient(cc *grpc.ClientConn) MyServiceClient
type MyServiceServer ¶
type MyServiceServer interface { // reuqest response CreateObject(context.Context, *HelloRequest) (*HelloReply, error) // reuqest response GetObject(context.Context, *HelloRequest) (*HelloReply, error) // reuqest stream - server stream to client GetStream(*HelloRequest, MyService_GetStreamServer) error // stream response - client stream to server GiveStream(MyService_GiveStreamServer) error // bistream - live Chat(MyService_ChatServer) error }
MyServiceServer is the server API for MyService service.
type MyService_ChatClient ¶
type MyService_ChatClient interface { Send(*HelloRequest) error Recv() (*HelloReply, error) grpc.ClientStream }
type MyService_ChatServer ¶
type MyService_ChatServer interface { Send(*HelloReply) error Recv() (*HelloRequest, error) grpc.ServerStream }
type MyService_GetStreamClient ¶
type MyService_GetStreamClient interface { Recv() (*HelloReply, error) grpc.ClientStream }
type MyService_GetStreamServer ¶
type MyService_GetStreamServer interface { Send(*HelloReply) error grpc.ServerStream }
type MyService_GiveStreamClient ¶
type MyService_GiveStreamClient interface { Send(*HelloRequest) error CloseAndRecv() (*HelloReply, error) grpc.ClientStream }
type MyService_GiveStreamServer ¶
type MyService_GiveStreamServer interface { SendAndClose(*HelloReply) error Recv() (*HelloRequest, error) grpc.ServerStream }
type UnimplementedMyServiceServer ¶
type UnimplementedMyServiceServer struct { }
UnimplementedMyServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedMyServiceServer) Chat ¶
func (*UnimplementedMyServiceServer) Chat(srv MyService_ChatServer) error
func (*UnimplementedMyServiceServer) CreateObject ¶
func (*UnimplementedMyServiceServer) CreateObject(ctx context.Context, req *HelloRequest) (*HelloReply, error)
func (*UnimplementedMyServiceServer) GetObject ¶
func (*UnimplementedMyServiceServer) GetObject(ctx context.Context, req *HelloRequest) (*HelloReply, error)
func (*UnimplementedMyServiceServer) GetStream ¶
func (*UnimplementedMyServiceServer) GetStream(req *HelloRequest, srv MyService_GetStreamServer) error
func (*UnimplementedMyServiceServer) GiveStream ¶
func (*UnimplementedMyServiceServer) GiveStream(srv MyService_GiveStreamServer) error
Click to show internal directories.
Click to hide internal directories.