Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterExampleHTTPServer(s *http.Server, srv ExampleHTTPServer)
- func RegisterExampleServer(s grpc.ServiceRegistrar, srv ExampleServer)
- type ExampleClient
- type ExampleHTTPClient
- type ExampleHTTPClientImpl
- type ExampleHTTPServer
- type ExampleServer
- type UnimplementedExampleServer
- type UnsafeExampleServer
Constants ¶
const (
Example_Hello_FullMethodName = "/wilson.api.game.example.v1.Example/Hello"
)
const OperationExampleHello = "/wilson.api.game.example.v1.Example/Hello"
Variables ¶
var Example_ServiceDesc = grpc.ServiceDesc{ ServiceName: "wilson.api.game.example.v1.Example", HandlerType: (*ExampleServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Hello", Handler: _Example_Hello_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "game/example/v1/example_service.proto", }
Example_ServiceDesc is the grpc.ServiceDesc for Example service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_game_example_v1_example_proto protoreflect.FileDescriptor
var File_game_example_v1_example_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExampleHTTPServer ¶
func RegisterExampleHTTPServer(s *http.Server, srv ExampleHTTPServer)
func RegisterExampleServer ¶
func RegisterExampleServer(s grpc.ServiceRegistrar, srv ExampleServer)
Types ¶
type ExampleClient ¶
type ExampleClient interface {
Hello(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
ExampleClient is the client API for Example 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 NewExampleClient ¶
func NewExampleClient(cc grpc.ClientConnInterface) ExampleClient
type ExampleHTTPClient ¶
type ExampleHTTPClient interface {
Hello(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
}
func NewExampleHTTPClient ¶
func NewExampleHTTPClient(client *http.Client) ExampleHTTPClient
type ExampleHTTPClientImpl ¶
type ExampleHTTPClientImpl struct {
// contains filtered or unexported fields
}
type ExampleHTTPServer ¶
type ExampleServer ¶
type ExampleServer interface { Hello(context.Context, *emptypb.Empty) (*emptypb.Empty, error) // contains filtered or unexported methods }
ExampleServer is the server API for Example service. All implementations must embed UnimplementedExampleServer for forward compatibility.
type UnimplementedExampleServer ¶
type UnimplementedExampleServer struct{}
UnimplementedExampleServer must 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.
type UnsafeExampleServer ¶
type UnsafeExampleServer interface {
// contains filtered or unexported methods
}
UnsafeExampleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleServer will result in compilation errors.