Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer)
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetAge() uint32
- func (x *HelloRequest) GetName() string
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- type HelloResponse
- type HelloServiceClient
- type HelloServiceServer
- type HelloService_SayHelloContinuousClient
- type HelloService_SayHelloContinuousServer
- type HelloService_SayHelloToEveryoneClient
- type HelloService_SayHelloToEveryoneServer
- type HelloService_SayManyHellosClient
- type HelloService_SayManyHellosServer
- type UnimplementedHelloServiceServer
- func (UnimplementedHelloServiceServer) SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
- func (UnimplementedHelloServiceServer) SayHelloContinuous(HelloService_SayHelloContinuousServer) error
- func (UnimplementedHelloServiceServer) SayHelloToEveryone(HelloService_SayHelloToEveryoneServer) error
- func (UnimplementedHelloServiceServer) SayManyHellos(*HelloRequest, HelloService_SayManyHellosServer) error
- type UnsafeHelloServiceServer
Constants ¶
const ( HelloService_SayHello_FullMethodName = "/hello.HelloService/SayHello" HelloService_SayManyHellos_FullMethodName = "/hello.HelloService/SayManyHellos" HelloService_SayHelloToEveryone_FullMethodName = "/hello.HelloService/SayHelloToEveryone" HelloService_SayHelloContinuous_FullMethodName = "/hello.HelloService/SayHelloContinuous" )
Variables ¶
var File_proto_hello_hello_proto protoreflect.FileDescriptor
var HelloService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hello.HelloService", HandlerType: (*HelloServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _HelloService_SayHello_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SayManyHellos", Handler: _HelloService_SayManyHellos_Handler, ServerStreams: true, }, { StreamName: "SayHelloToEveryone", Handler: _HelloService_SayHelloToEveryone_Handler, ClientStreams: true, }, { StreamName: "SayHelloContinuous", Handler: _HelloService_SayHelloContinuous_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/hello/hello.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 { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Age uint32 `protobuf:"varint,16,opt,name=age,proto3" json:"age,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetAge ¶
func (x *HelloRequest) GetAge() uint32
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() 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 { Greet string `protobuf:"bytes,1,opt,name=greet,proto3" json:"greet,omitempty"` // contains filtered or unexported fields }
func (*HelloResponse) Descriptor
deprecated
func (*HelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.
func (*HelloResponse) GetGreet ¶
func (x *HelloResponse) GetGreet() 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 { SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) SayManyHellos(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (HelloService_SayManyHellosClient, error) SayHelloToEveryone(ctx context.Context, opts ...grpc.CallOption) (HelloService_SayHelloToEveryoneClient, error) SayHelloContinuous(ctx context.Context, opts ...grpc.CallOption) (HelloService_SayHelloContinuousClient, 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 { SayHello(context.Context, *HelloRequest) (*HelloResponse, error) SayManyHellos(*HelloRequest, HelloService_SayManyHellosServer) error SayHelloToEveryone(HelloService_SayHelloToEveryoneServer) error SayHelloContinuous(HelloService_SayHelloContinuousServer) error // contains filtered or unexported methods }
HelloServiceServer is the server API for HelloService service. All implementations must embed UnimplementedHelloServiceServer for forward compatibility
type HelloService_SayHelloContinuousClient ¶ added in v0.0.5
type HelloService_SayHelloContinuousClient interface { Send(*HelloRequest) error Recv() (*HelloResponse, error) grpc.ClientStream }
type HelloService_SayHelloContinuousServer ¶ added in v0.0.5
type HelloService_SayHelloContinuousServer interface { Send(*HelloResponse) error Recv() (*HelloRequest, error) grpc.ServerStream }
type HelloService_SayHelloToEveryoneClient ¶ added in v0.0.4
type HelloService_SayHelloToEveryoneClient interface { Send(*HelloRequest) error CloseAndRecv() (*HelloResponse, error) grpc.ClientStream }
type HelloService_SayHelloToEveryoneServer ¶ added in v0.0.4
type HelloService_SayHelloToEveryoneServer interface { SendAndClose(*HelloResponse) error Recv() (*HelloRequest, error) grpc.ServerStream }
type HelloService_SayManyHellosClient ¶ added in v0.0.3
type HelloService_SayManyHellosClient interface { Recv() (*HelloResponse, error) grpc.ClientStream }
type HelloService_SayManyHellosServer ¶ added in v0.0.3
type HelloService_SayManyHellosServer interface { Send(*HelloResponse) error grpc.ServerStream }
type UnimplementedHelloServiceServer ¶
type UnimplementedHelloServiceServer struct { }
UnimplementedHelloServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedHelloServiceServer) SayHello ¶
func (UnimplementedHelloServiceServer) SayHello(context.Context, *HelloRequest) (*HelloResponse, error)
func (UnimplementedHelloServiceServer) SayHelloContinuous ¶ added in v0.0.5
func (UnimplementedHelloServiceServer) SayHelloContinuous(HelloService_SayHelloContinuousServer) error
func (UnimplementedHelloServiceServer) SayHelloToEveryone ¶ added in v0.0.4
func (UnimplementedHelloServiceServer) SayHelloToEveryone(HelloService_SayHelloToEveryoneServer) error
func (UnimplementedHelloServiceServer) SayManyHellos ¶ added in v0.0.3
func (UnimplementedHelloServiceServer) SayManyHellos(*HelloRequest, HelloService_SayManyHellosServer) 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.