Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ExampleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example_v1.ExampleService", HandlerType: (*ExampleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetLen", Handler: _ExampleService_GetLen_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "example_v1/example.proto", }
ExampleService_ServiceDesc is the grpc.ServiceDesc for ExampleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_example_v1_example_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExampleServiceServer ¶
func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
Types ¶
type ExampleServiceClient ¶
type ExampleServiceClient interface {
GetLen(ctx context.Context, in *TxtRequest, opts ...grpc.CallOption) (*TxtResponse, error)
}
ExampleServiceClient is the client API for ExampleService 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 NewExampleServiceClient ¶
func NewExampleServiceClient(cc grpc.ClientConnInterface) ExampleServiceClient
type ExampleServiceServer ¶
type ExampleServiceServer interface { GetLen(context.Context, *TxtRequest) (*TxtResponse, error) // contains filtered or unexported methods }
ExampleServiceServer is the server API for ExampleService service. All implementations must embed UnimplementedExampleServiceServer for forward compatibility
type TxtRequest ¶
type TxtRequest struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*TxtRequest) Descriptor
deprecated
func (*TxtRequest) Descriptor() ([]byte, []int)
Deprecated: Use TxtRequest.ProtoReflect.Descriptor instead.
func (*TxtRequest) GetText ¶
func (x *TxtRequest) GetText() string
func (*TxtRequest) ProtoMessage ¶
func (*TxtRequest) ProtoMessage()
func (*TxtRequest) ProtoReflect ¶
func (x *TxtRequest) ProtoReflect() protoreflect.Message
func (*TxtRequest) Reset ¶
func (x *TxtRequest) Reset()
func (*TxtRequest) String ¶
func (x *TxtRequest) String() string
type TxtResponse ¶
type TxtResponse struct { Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // contains filtered or unexported fields }
func (*TxtResponse) Descriptor
deprecated
func (*TxtResponse) Descriptor() ([]byte, []int)
Deprecated: Use TxtResponse.ProtoReflect.Descriptor instead.
func (*TxtResponse) GetNumber ¶
func (x *TxtResponse) GetNumber() uint32
func (*TxtResponse) ProtoMessage ¶
func (*TxtResponse) ProtoMessage()
func (*TxtResponse) ProtoReflect ¶
func (x *TxtResponse) ProtoReflect() protoreflect.Message
func (*TxtResponse) Reset ¶
func (x *TxtResponse) Reset()
func (*TxtResponse) String ¶
func (x *TxtResponse) String() string
type UnimplementedExampleServiceServer ¶
type UnimplementedExampleServiceServer struct { }
UnimplementedExampleServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedExampleServiceServer) GetLen ¶
func (UnimplementedExampleServiceServer) GetLen(context.Context, *TxtRequest) (*TxtResponse, error)
type UnsafeExampleServiceServer ¶
type UnsafeExampleServiceServer interface {
// contains filtered or unexported methods
}
UnsafeExampleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleServiceServer will result in compilation errors.