Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
- type HelloRequest
- type HelloResponse
- type HelloServiceClient
- type HelloServiceServer
- type HelloService_HelloStreamingClient
- type HelloService_HelloStreamingServer
- type UnimplementedHelloServiceServer
- type UnsafeHelloServiceServer
Constants ¶
const ( HelloService_HelloUnary_FullMethodName = "/testpb.HelloService/HelloUnary" HelloService_HelloStreaming_FullMethodName = "/testpb.HelloService/HelloStreaming" )
Variables ¶
var File_test_proto protoreflect.FileDescriptor
var HelloService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "testpb.HelloService", HandlerType: (*HelloServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "HelloUnary", Handler: _HelloService_HelloUnary_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "HelloStreaming", Handler: _HelloService_HelloStreaming_Handler, ServerStreams: true, }, }, Metadata: "test.proto", }
HelloService_ServiceDesc is the grpc.ServiceDesc for HelloService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterHelloServiceServer ¶
func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
Types ¶
type HelloRequest ¶
type HelloRequest struct { Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetMessage ¶
func (x *HelloRequest) GetMessage() string
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type HelloResponse ¶
type HelloResponse struct { Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloResponse) Descriptor
deprecated
func (*HelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.
func (*HelloResponse) GetMessage ¶
func (x *HelloResponse) GetMessage() string
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) ProtoReflect ¶
func (x *HelloResponse) ProtoReflect() protoreflect.Message
func (*HelloResponse) Reset ¶
func (x *HelloResponse) Reset()
func (*HelloResponse) String ¶
func (x *HelloResponse) String() string
type HelloServiceClient ¶
type HelloServiceClient interface { HelloUnary(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) HelloStreaming(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (HelloService_HelloStreamingClient, error) }
HelloServiceClient is the client API for HelloService 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 NewHelloServiceClient ¶
func NewHelloServiceClient(cc grpc.ClientConnInterface) HelloServiceClient
type HelloServiceServer ¶
type HelloServiceServer interface { HelloUnary(context.Context, *HelloRequest) (*HelloResponse, error) HelloStreaming(*HelloRequest, HelloService_HelloStreamingServer) error // contains filtered or unexported methods }
HelloServiceServer is the server API for HelloService service. All implementations must embed UnimplementedHelloServiceServer for forward compatibility
type HelloService_HelloStreamingClient ¶
type HelloService_HelloStreamingClient interface { Recv() (*HelloResponse, error) grpc.ClientStream }
type HelloService_HelloStreamingServer ¶
type HelloService_HelloStreamingServer interface { Send(*HelloResponse) error grpc.ServerStream }
type UnimplementedHelloServiceServer ¶
type UnimplementedHelloServiceServer struct { }
UnimplementedHelloServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedHelloServiceServer) HelloStreaming ¶
func (UnimplementedHelloServiceServer) HelloStreaming(*HelloRequest, HelloService_HelloStreamingServer) error
func (UnimplementedHelloServiceServer) HelloUnary ¶
func (UnimplementedHelloServiceServer) HelloUnary(context.Context, *HelloRequest) (*HelloResponse, error)
type UnsafeHelloServiceServer ¶
type UnsafeHelloServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHelloServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HelloServiceServer will result in compilation errors.