Documentation ¶
Index ¶
- Constants
- Variables
- func NewTestService(name ...string) *testGRPCService
- func Register(server *grpc.Server)
- func RegisterExampleGRPCServiceServer(s grpc.ServiceRegistrar, srv ExampleGRPCServiceServer)
- type ExampleGRPCServiceClient
- type ExampleGRPCServiceServer
- type PingRequest
- type PingResponse
- type UnimplementedExampleGRPCServiceServer
- type UnsafeExampleGRPCServiceServer
Constants ¶
const (
ExampleGRPCService_Ping_FullMethodName = "/ExampleGRPCService/Ping"
)
Variables ¶
var ExampleGRPCService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ExampleGRPCService", HandlerType: (*ExampleGRPCServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Ping", Handler: _ExampleGRPCService_Ping_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "web/grpc_example/service.proto", }
ExampleGRPCService_ServiceDesc is the grpc.ServiceDesc for ExampleGRPCService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_web_grpc_example_service_proto protoreflect.FileDescriptor
Functions ¶
func NewTestService ¶
func NewTestService(name ...string) *testGRPCService
NewTestService it's example package, so we should not care about exports
nolint:revive
func RegisterExampleGRPCServiceServer ¶
func RegisterExampleGRPCServiceServer(s grpc.ServiceRegistrar, srv ExampleGRPCServiceServer)
Types ¶
type ExampleGRPCServiceClient ¶
type ExampleGRPCServiceClient interface {
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
}
ExampleGRPCServiceClient is the client API for ExampleGRPCService 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 NewExampleGRPCServiceClient ¶
func NewExampleGRPCServiceClient(cc grpc.ClientConnInterface) ExampleGRPCServiceClient
type ExampleGRPCServiceServer ¶
type ExampleGRPCServiceServer interface { Ping(context.Context, *PingRequest) (*PingResponse, error) // contains filtered or unexported methods }
ExampleGRPCServiceServer is the server API for ExampleGRPCService service. All implementations must embed UnimplementedExampleGRPCServiceServer for forward compatibility
type PingRequest ¶
type PingRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) GetName ¶
func (x *PingRequest) GetName() string
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingResponse ¶
type PingResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetMessage ¶
func (x *PingResponse) GetMessage() string
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type UnimplementedExampleGRPCServiceServer ¶
type UnimplementedExampleGRPCServiceServer struct { }
UnimplementedExampleGRPCServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedExampleGRPCServiceServer) Ping ¶
func (UnimplementedExampleGRPCServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error)
type UnsafeExampleGRPCServiceServer ¶
type UnsafeExampleGRPCServiceServer interface {
// contains filtered or unexported methods
}
UnsafeExampleGRPCServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleGRPCServiceServer will result in compilation errors.