Documentation
¶
Index ¶
Constants ¶
const ( EchoService_Echo_FullMethodName = "/testpb.EchoService/Echo" EchoService_EchoStream_FullMethodName = "/testpb.EchoService/EchoStream" )
Variables ¶
var EchoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "testpb.EchoService", HandlerType: (*EchoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Echo", Handler: _EchoService_Echo_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "EchoStream", Handler: _EchoService_EchoStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "echo.proto", }
EchoService_ServiceDesc is the grpc.ServiceDesc for EchoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_echo_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServiceServer ¶
func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)
Types ¶
type EchoServiceClient ¶
type EchoServiceClient interface {
Echo(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error)
EchoStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Message, Message], error)
}
EchoServiceClient is the client API for EchoService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEchoServiceClient ¶
func NewEchoServiceClient(cc grpc.ClientConnInterface) EchoServiceClient
type EchoServiceServer ¶
type EchoServiceServer interface {
Echo(context.Context, *Message) (*Message, error)
EchoStream(grpc.BidiStreamingServer[Message, Message]) error
}
EchoServiceServer is the server API for EchoService service. All implementations should embed UnimplementedEchoServiceServer for forward compatibility.
type EchoService_EchoStreamClient ¶
type EchoService_EchoStreamClient = grpc.BidiStreamingClient[Message, Message]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type EchoService_EchoStreamServer ¶
type EchoService_EchoStreamServer = grpc.BidiStreamingServer[Message, Message]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Message ¶
type Message struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
Sequence int32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
// contains filtered or unexported fields
}
func (*Message) Descriptor
deprecated
func (*Message) GetMessage ¶
func (*Message) GetSequence ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type UnimplementedEchoServiceServer ¶
type UnimplementedEchoServiceServer struct{}
UnimplementedEchoServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedEchoServiceServer) EchoStream ¶
func (UnimplementedEchoServiceServer) EchoStream(grpc.BidiStreamingServer[Message, Message]) error
type UnsafeEchoServiceServer ¶
type UnsafeEchoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEchoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServiceServer will result in compilation errors.