Documentation ¶
Index ¶
- Variables
- func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer)
- type ClientStreamingEchoRequest
- func (*ClientStreamingEchoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ClientStreamingEchoRequest) GetMessage() string
- func (*ClientStreamingEchoRequest) ProtoMessage()
- func (x *ClientStreamingEchoRequest) ProtoReflect() protoreflect.Message
- func (x *ClientStreamingEchoRequest) Reset()
- func (x *ClientStreamingEchoRequest) String() string
- type ClientStreamingEchoResponse
- func (*ClientStreamingEchoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ClientStreamingEchoResponse) GetMessageCount() int32
- func (*ClientStreamingEchoResponse) ProtoMessage()
- func (x *ClientStreamingEchoResponse) ProtoReflect() protoreflect.Message
- func (x *ClientStreamingEchoResponse) Reset()
- func (x *ClientStreamingEchoResponse) String() string
- type EchoRequest
- type EchoResponse
- func (*EchoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EchoResponse) GetMessage() string
- func (x *EchoResponse) GetMessageCount() int32
- func (*EchoResponse) ProtoMessage()
- func (x *EchoResponse) ProtoReflect() protoreflect.Message
- func (x *EchoResponse) Reset()
- func (x *EchoResponse) String() string
- type EchoServiceClient
- type EchoServiceServer
- type EchoService_ClientStreamingEchoClient
- type EchoService_ClientStreamingEchoServer
- type EchoService_FullDuplexEchoClient
- type EchoService_FullDuplexEchoServer
- type EchoService_HalfDuplexEchoClient
- type EchoService_HalfDuplexEchoServer
- type EchoService_ServerStreamingEchoAbortClient
- type EchoService_ServerStreamingEchoAbortServer
- type EchoService_ServerStreamingEchoClient
- type EchoService_ServerStreamingEchoServer
- type Empty
- type ServerStreamingEchoRequest
- func (*ServerStreamingEchoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ServerStreamingEchoRequest) GetMessage() string
- func (x *ServerStreamingEchoRequest) GetMessageCount() int32
- func (x *ServerStreamingEchoRequest) GetMessageInterval() *duration.Duration
- func (*ServerStreamingEchoRequest) ProtoMessage()
- func (x *ServerStreamingEchoRequest) ProtoReflect() protoreflect.Message
- func (x *ServerStreamingEchoRequest) Reset()
- func (x *ServerStreamingEchoRequest) String() string
- type ServerStreamingEchoResponse
- func (*ServerStreamingEchoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ServerStreamingEchoResponse) GetMessage() string
- func (*ServerStreamingEchoResponse) ProtoMessage()
- func (x *ServerStreamingEchoResponse) ProtoReflect() protoreflect.Message
- func (x *ServerStreamingEchoResponse) Reset()
- func (x *ServerStreamingEchoResponse) String() string
- type UnimplementedEchoServiceServer
- func (*UnimplementedEchoServiceServer) ClientStreamingEcho(EchoService_ClientStreamingEchoServer) error
- func (*UnimplementedEchoServiceServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error)
- func (*UnimplementedEchoServiceServer) EchoAbort(context.Context, *EchoRequest) (*EchoResponse, error)
- func (*UnimplementedEchoServiceServer) FullDuplexEcho(EchoService_FullDuplexEchoServer) error
- func (*UnimplementedEchoServiceServer) HalfDuplexEcho(EchoService_HalfDuplexEchoServer) error
- func (*UnimplementedEchoServiceServer) NoOp(context.Context, *Empty) (*Empty, error)
- func (*UnimplementedEchoServiceServer) ServerStreamingEcho(*ServerStreamingEchoRequest, EchoService_ServerStreamingEchoServer) error
- func (*UnimplementedEchoServiceServer) ServerStreamingEchoAbort(*ServerStreamingEchoRequest, EchoService_ServerStreamingEchoAbortServer) error
Constants ¶
This section is empty.
Variables ¶
var File_echo_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServiceServer ¶
func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer)
Types ¶
type ClientStreamingEchoRequest ¶
type ClientStreamingEchoRequest struct { // A special value "" indicates that there's no further messages. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
Request type for client side streaming echo.
func (*ClientStreamingEchoRequest) Descriptor
deprecated
func (*ClientStreamingEchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use ClientStreamingEchoRequest.ProtoReflect.Descriptor instead.
func (*ClientStreamingEchoRequest) GetMessage ¶
func (x *ClientStreamingEchoRequest) GetMessage() string
func (*ClientStreamingEchoRequest) ProtoMessage ¶
func (*ClientStreamingEchoRequest) ProtoMessage()
func (*ClientStreamingEchoRequest) ProtoReflect ¶
func (x *ClientStreamingEchoRequest) ProtoReflect() protoreflect.Message
func (*ClientStreamingEchoRequest) Reset ¶
func (x *ClientStreamingEchoRequest) Reset()
func (*ClientStreamingEchoRequest) String ¶
func (x *ClientStreamingEchoRequest) String() string
type ClientStreamingEchoResponse ¶
type ClientStreamingEchoResponse struct { // Total number of client messages that have been received. MessageCount int32 `protobuf:"varint,1,opt,name=message_count,json=messageCount,proto3" json:"message_count,omitempty"` // contains filtered or unexported fields }
Response type for client side streaming echo.
func (*ClientStreamingEchoResponse) Descriptor
deprecated
func (*ClientStreamingEchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use ClientStreamingEchoResponse.ProtoReflect.Descriptor instead.
func (*ClientStreamingEchoResponse) GetMessageCount ¶
func (x *ClientStreamingEchoResponse) GetMessageCount() int32
func (*ClientStreamingEchoResponse) ProtoMessage ¶
func (*ClientStreamingEchoResponse) ProtoMessage()
func (*ClientStreamingEchoResponse) ProtoReflect ¶
func (x *ClientStreamingEchoResponse) ProtoReflect() protoreflect.Message
func (*ClientStreamingEchoResponse) Reset ¶
func (x *ClientStreamingEchoResponse) Reset()
func (*ClientStreamingEchoResponse) String ¶
func (x *ClientStreamingEchoResponse) String() string
type EchoRequest ¶
type EchoRequest struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetMessage ¶
func (x *EchoRequest) GetMessage() string
func (*EchoRequest) ProtoMessage ¶
func (*EchoRequest) ProtoMessage()
func (*EchoRequest) ProtoReflect ¶
func (x *EchoRequest) ProtoReflect() protoreflect.Message
func (*EchoRequest) Reset ¶
func (x *EchoRequest) Reset()
func (*EchoRequest) String ¶
func (x *EchoRequest) String() string
type EchoResponse ¶
type EchoResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` MessageCount int32 `protobuf:"varint,2,opt,name=message_count,json=messageCount,proto3" json:"message_count,omitempty"` // contains filtered or unexported fields }
func (*EchoResponse) Descriptor
deprecated
func (*EchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.
func (*EchoResponse) GetMessage ¶
func (x *EchoResponse) GetMessage() string
func (*EchoResponse) GetMessageCount ¶
func (x *EchoResponse) GetMessageCount() int32
func (*EchoResponse) ProtoMessage ¶
func (*EchoResponse) ProtoMessage()
func (*EchoResponse) ProtoReflect ¶
func (x *EchoResponse) ProtoReflect() protoreflect.Message
func (*EchoResponse) Reset ¶
func (x *EchoResponse) Reset()
func (*EchoResponse) String ¶
func (x *EchoResponse) String() string
type EchoServiceClient ¶
type EchoServiceClient interface { // One request followed by one response // The server returns the client message as-is. Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) // Sends back abort status. EchoAbort(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) // One empty request, ZERO processing, followed by one empty response // (minimum effort to do message serialization). NoOp(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) // One request followed by a sequence of responses (streamed download). // The server will return the same client message repeatedly. ServerStreamingEcho(ctx context.Context, in *ServerStreamingEchoRequest, opts ...grpc.CallOption) (EchoService_ServerStreamingEchoClient, error) // One request followed by a sequence of responses (streamed download). // The server abort directly. ServerStreamingEchoAbort(ctx context.Context, in *ServerStreamingEchoRequest, opts ...grpc.CallOption) (EchoService_ServerStreamingEchoAbortClient, error) // A sequence of requests followed by one response (streamed upload). // The server returns the total number of messages as the result. ClientStreamingEcho(ctx context.Context, opts ...grpc.CallOption) (EchoService_ClientStreamingEchoClient, error) // A sequence of requests with each message echoed by the server immediately. // The server returns the same client messages in order. // E.g. this is how the speech API works. FullDuplexEcho(ctx context.Context, opts ...grpc.CallOption) (EchoService_FullDuplexEchoClient, error) // A sequence of requests followed by a sequence of responses. // The server buffers all the client messages and then returns the same // client messages one by one after the client half-closes the stream. // This is how an image recognition API may work. HalfDuplexEcho(ctx context.Context, opts ...grpc.CallOption) (EchoService_HalfDuplexEchoClient, error) }
EchoServiceClient is the client API for EchoService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEchoServiceClient ¶
func NewEchoServiceClient(cc grpc.ClientConnInterface) EchoServiceClient
type EchoServiceServer ¶
type EchoServiceServer interface { // One request followed by one response // The server returns the client message as-is. Echo(context.Context, *EchoRequest) (*EchoResponse, error) // Sends back abort status. EchoAbort(context.Context, *EchoRequest) (*EchoResponse, error) // One empty request, ZERO processing, followed by one empty response // (minimum effort to do message serialization). NoOp(context.Context, *Empty) (*Empty, error) // One request followed by a sequence of responses (streamed download). // The server will return the same client message repeatedly. ServerStreamingEcho(*ServerStreamingEchoRequest, EchoService_ServerStreamingEchoServer) error // One request followed by a sequence of responses (streamed download). // The server abort directly. ServerStreamingEchoAbort(*ServerStreamingEchoRequest, EchoService_ServerStreamingEchoAbortServer) error // A sequence of requests followed by one response (streamed upload). // The server returns the total number of messages as the result. ClientStreamingEcho(EchoService_ClientStreamingEchoServer) error // A sequence of requests with each message echoed by the server immediately. // The server returns the same client messages in order. // E.g. this is how the speech API works. FullDuplexEcho(EchoService_FullDuplexEchoServer) error // A sequence of requests followed by a sequence of responses. // The server buffers all the client messages and then returns the same // client messages one by one after the client half-closes the stream. // This is how an image recognition API may work. HalfDuplexEcho(EchoService_HalfDuplexEchoServer) error }
EchoServiceServer is the server API for EchoService service.
type EchoService_ClientStreamingEchoClient ¶
type EchoService_ClientStreamingEchoClient interface { Send(*ClientStreamingEchoRequest) error CloseAndRecv() (*ClientStreamingEchoResponse, error) grpc.ClientStream }
type EchoService_ClientStreamingEchoServer ¶
type EchoService_ClientStreamingEchoServer interface { SendAndClose(*ClientStreamingEchoResponse) error Recv() (*ClientStreamingEchoRequest, error) grpc.ServerStream }
type EchoService_FullDuplexEchoClient ¶
type EchoService_FullDuplexEchoClient interface { Send(*EchoRequest) error Recv() (*EchoResponse, error) grpc.ClientStream }
type EchoService_FullDuplexEchoServer ¶
type EchoService_FullDuplexEchoServer interface { Send(*EchoResponse) error Recv() (*EchoRequest, error) grpc.ServerStream }
type EchoService_HalfDuplexEchoClient ¶
type EchoService_HalfDuplexEchoClient interface { Send(*EchoRequest) error Recv() (*EchoResponse, error) grpc.ClientStream }
type EchoService_HalfDuplexEchoServer ¶
type EchoService_HalfDuplexEchoServer interface { Send(*EchoResponse) error Recv() (*EchoRequest, error) grpc.ServerStream }
type EchoService_ServerStreamingEchoAbortClient ¶
type EchoService_ServerStreamingEchoAbortClient interface { Recv() (*ServerStreamingEchoResponse, error) grpc.ClientStream }
type EchoService_ServerStreamingEchoAbortServer ¶
type EchoService_ServerStreamingEchoAbortServer interface { Send(*ServerStreamingEchoResponse) error grpc.ServerStream }
type EchoService_ServerStreamingEchoClient ¶
type EchoService_ServerStreamingEchoClient interface { Recv() (*ServerStreamingEchoResponse, error) grpc.ClientStream }
type EchoService_ServerStreamingEchoServer ¶
type EchoService_ServerStreamingEchoServer interface { Send(*ServerStreamingEchoResponse) error grpc.ServerStream }
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type ServerStreamingEchoRequest ¶
type ServerStreamingEchoRequest struct { // Message string for server streaming request. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // The total number of messages to be generated before the server // closes the stream; default is 10. MessageCount int32 `protobuf:"varint,2,opt,name=message_count,json=messageCount,proto3" json:"message_count,omitempty"` // The interval between two server messages. The server implementation // may enforce some minimum interval (e.g. 100ms) to avoid message overflow. MessageInterval *duration.Duration `protobuf:"bytes,3,opt,name=message_interval,json=messageInterval,proto3" json:"message_interval,omitempty"` // contains filtered or unexported fields }
Request type for server side streaming echo.
func (*ServerStreamingEchoRequest) Descriptor
deprecated
func (*ServerStreamingEchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use ServerStreamingEchoRequest.ProtoReflect.Descriptor instead.
func (*ServerStreamingEchoRequest) GetMessage ¶
func (x *ServerStreamingEchoRequest) GetMessage() string
func (*ServerStreamingEchoRequest) GetMessageCount ¶
func (x *ServerStreamingEchoRequest) GetMessageCount() int32
func (*ServerStreamingEchoRequest) GetMessageInterval ¶
func (x *ServerStreamingEchoRequest) GetMessageInterval() *duration.Duration
func (*ServerStreamingEchoRequest) ProtoMessage ¶
func (*ServerStreamingEchoRequest) ProtoMessage()
func (*ServerStreamingEchoRequest) ProtoReflect ¶
func (x *ServerStreamingEchoRequest) ProtoReflect() protoreflect.Message
func (*ServerStreamingEchoRequest) Reset ¶
func (x *ServerStreamingEchoRequest) Reset()
func (*ServerStreamingEchoRequest) String ¶
func (x *ServerStreamingEchoRequest) String() string
type ServerStreamingEchoResponse ¶
type ServerStreamingEchoResponse struct { // Response message. Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
Response type for server streaming response.
func (*ServerStreamingEchoResponse) Descriptor
deprecated
func (*ServerStreamingEchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use ServerStreamingEchoResponse.ProtoReflect.Descriptor instead.
func (*ServerStreamingEchoResponse) GetMessage ¶
func (x *ServerStreamingEchoResponse) GetMessage() string
func (*ServerStreamingEchoResponse) ProtoMessage ¶
func (*ServerStreamingEchoResponse) ProtoMessage()
func (*ServerStreamingEchoResponse) ProtoReflect ¶
func (x *ServerStreamingEchoResponse) ProtoReflect() protoreflect.Message
func (*ServerStreamingEchoResponse) Reset ¶
func (x *ServerStreamingEchoResponse) Reset()
func (*ServerStreamingEchoResponse) String ¶
func (x *ServerStreamingEchoResponse) String() string
type UnimplementedEchoServiceServer ¶
type UnimplementedEchoServiceServer struct { }
UnimplementedEchoServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedEchoServiceServer) ClientStreamingEcho ¶
func (*UnimplementedEchoServiceServer) ClientStreamingEcho(EchoService_ClientStreamingEchoServer) error
func (*UnimplementedEchoServiceServer) Echo ¶
func (*UnimplementedEchoServiceServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error)
func (*UnimplementedEchoServiceServer) EchoAbort ¶
func (*UnimplementedEchoServiceServer) EchoAbort(context.Context, *EchoRequest) (*EchoResponse, error)
func (*UnimplementedEchoServiceServer) FullDuplexEcho ¶
func (*UnimplementedEchoServiceServer) FullDuplexEcho(EchoService_FullDuplexEchoServer) error
func (*UnimplementedEchoServiceServer) HalfDuplexEcho ¶
func (*UnimplementedEchoServiceServer) HalfDuplexEcho(EchoService_HalfDuplexEchoServer) error
func (*UnimplementedEchoServiceServer) ServerStreamingEcho ¶
func (*UnimplementedEchoServiceServer) ServerStreamingEcho(*ServerStreamingEchoRequest, EchoService_ServerStreamingEchoServer) error
func (*UnimplementedEchoServiceServer) ServerStreamingEchoAbort ¶
func (*UnimplementedEchoServiceServer) ServerStreamingEchoAbort(*ServerStreamingEchoRequest, EchoService_ServerStreamingEchoAbortServer) error