Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_proto_game_plugin_proto protoreflect.FileDescriptor
var Game_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Game", HandlerType: (*GameServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Open", Handler: _Game_Open_Handler, }, { MethodName: "Close", Handler: _Game_Close_Handler, }, { MethodName: "Request", Handler: _Game_Request_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/game_plugin.proto", }
Game_ServiceDesc is the grpc.ServiceDesc for Game service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGameServer ¶
func RegisterGameServer(s grpc.ServiceRegistrar, srv GameServer)
Types ¶
type CloseResponse ¶
type CloseResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*CloseResponse) Descriptor
deprecated
func (*CloseResponse) Descriptor() ([]byte, []int)
Deprecated: Use CloseResponse.ProtoReflect.Descriptor instead.
func (*CloseResponse) GetMessage ¶
func (x *CloseResponse) GetMessage() string
func (*CloseResponse) ProtoMessage ¶
func (*CloseResponse) ProtoMessage()
func (*CloseResponse) ProtoReflect ¶
func (x *CloseResponse) ProtoReflect() protoreflect.Message
func (*CloseResponse) Reset ¶
func (x *CloseResponse) Reset()
func (*CloseResponse) String ¶
func (x *CloseResponse) String() string
type EmptyRequest ¶
type EmptyRequest struct {
// contains filtered or unexported fields
}
func (*EmptyRequest) Descriptor
deprecated
func (*EmptyRequest) Descriptor() ([]byte, []int)
Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead.
func (*EmptyRequest) ProtoMessage ¶
func (*EmptyRequest) ProtoMessage()
func (*EmptyRequest) ProtoReflect ¶
func (x *EmptyRequest) ProtoReflect() protoreflect.Message
func (*EmptyRequest) Reset ¶
func (x *EmptyRequest) Reset()
func (*EmptyRequest) String ¶
func (x *EmptyRequest) String() string
type EmptyResponse ¶
type EmptyResponse struct {
// contains filtered or unexported fields
}
func (*EmptyResponse) Descriptor
deprecated
func (*EmptyResponse) Descriptor() ([]byte, []int)
Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead.
func (*EmptyResponse) ProtoMessage ¶
func (*EmptyResponse) ProtoMessage()
func (*EmptyResponse) ProtoReflect ¶
func (x *EmptyResponse) ProtoReflect() protoreflect.Message
func (*EmptyResponse) Reset ¶
func (x *EmptyResponse) Reset()
func (*EmptyResponse) String ¶
func (x *EmptyResponse) String() string
type GameClient ¶
type GameClient interface { Open(ctx context.Context, in *OpenRequest, opts ...grpc.CallOption) (*EmptyResponse, error) Close(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*CloseResponse, error) Request(ctx context.Context, in *GameRequest, opts ...grpc.CallOption) (*GameResponse, error) }
GameClient is the client API for Game 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 NewGameClient ¶
func NewGameClient(cc grpc.ClientConnInterface) GameClient
type GameRequest ¶
type GameRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*GameRequest) Descriptor
deprecated
func (*GameRequest) Descriptor() ([]byte, []int)
Deprecated: Use GameRequest.ProtoReflect.Descriptor instead.
func (*GameRequest) GetData ¶
func (x *GameRequest) GetData() []byte
func (*GameRequest) GetName ¶
func (x *GameRequest) GetName() string
func (*GameRequest) ProtoMessage ¶
func (*GameRequest) ProtoMessage()
func (*GameRequest) ProtoReflect ¶
func (x *GameRequest) ProtoReflect() protoreflect.Message
func (*GameRequest) Reset ¶
func (x *GameRequest) Reset()
func (*GameRequest) String ¶
func (x *GameRequest) String() string
type GameResponse ¶
type GameResponse struct { Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*GameResponse) Descriptor
deprecated
func (*GameResponse) Descriptor() ([]byte, []int)
Deprecated: Use GameResponse.ProtoReflect.Descriptor instead.
func (*GameResponse) GetData ¶
func (x *GameResponse) GetData() []byte
func (*GameResponse) ProtoMessage ¶
func (*GameResponse) ProtoMessage()
func (*GameResponse) ProtoReflect ¶
func (x *GameResponse) ProtoReflect() protoreflect.Message
func (*GameResponse) Reset ¶
func (x *GameResponse) Reset()
func (*GameResponse) String ¶
func (x *GameResponse) String() string
type GameServer ¶
type GameServer interface { Open(context.Context, *OpenRequest) (*EmptyResponse, error) Close(context.Context, *EmptyRequest) (*CloseResponse, error) Request(context.Context, *GameRequest) (*GameResponse, error) }
GameServer is the server API for Game service. All implementations should embed UnimplementedGameServer for forward compatibility
type OpenRequest ¶
type OpenRequest struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` // contains filtered or unexported fields }
func (*OpenRequest) Descriptor
deprecated
func (*OpenRequest) Descriptor() ([]byte, []int)
Deprecated: Use OpenRequest.ProtoReflect.Descriptor instead.
func (*OpenRequest) GetHost ¶
func (x *OpenRequest) GetHost() string
func (*OpenRequest) GetPort ¶
func (x *OpenRequest) GetPort() uint32
func (*OpenRequest) ProtoMessage ¶
func (*OpenRequest) ProtoMessage()
func (*OpenRequest) ProtoReflect ¶
func (x *OpenRequest) ProtoReflect() protoreflect.Message
func (*OpenRequest) Reset ¶
func (x *OpenRequest) Reset()
func (*OpenRequest) String ¶
func (x *OpenRequest) String() string
type UnimplementedGameServer ¶
type UnimplementedGameServer struct { }
UnimplementedGameServer should be embedded to have forward compatible implementations.
func (UnimplementedGameServer) Close ¶
func (UnimplementedGameServer) Close(context.Context, *EmptyRequest) (*CloseResponse, error)
func (UnimplementedGameServer) Open ¶
func (UnimplementedGameServer) Open(context.Context, *OpenRequest) (*EmptyResponse, error)
func (UnimplementedGameServer) Request ¶
func (UnimplementedGameServer) Request(context.Context, *GameRequest) (*GameResponse, error)
type UnsafeGameServer ¶
type UnsafeGameServer interface {
// contains filtered or unexported methods
}
UnsafeGameServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GameServer will result in compilation errors.