Documentation ¶
Index ¶
- Variables
- func RegisterManagerServer(s grpc.ServiceRegistrar, srv ManagerServer)
- type Client
- type ManagerClient
- type ManagerServer
- type Manager_MessageClient
- type Manager_MessageServer
- type MessageResponse
- func (*MessageResponse) Descriptor() ([]byte, []int)deprecated
- func (x *MessageResponse) GetContent() string
- func (x *MessageResponse) GetId() uint64
- func (x *MessageResponse) GetLocked() bool
- func (x *MessageResponse) GetType() string
- func (*MessageResponse) ProtoMessage()
- func (x *MessageResponse) ProtoReflect() protoreflect.Message
- func (x *MessageResponse) Reset()
- func (x *MessageResponse) String() string
- type MinecraftState
- func (MinecraftState) Descriptor() protoreflect.EnumDescriptor
- func (x MinecraftState) Enum() *MinecraftState
- func (MinecraftState) EnumDescriptor() ([]byte, []int)deprecated
- func (x MinecraftState) Number() protoreflect.EnumNumber
- func (x MinecraftState) String() string
- func (MinecraftState) Type() protoreflect.EnumType
- type StartRequest
- func (*StartRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StartRequest) GetClient() *Client
- func (x *StartRequest) GetPath() string
- func (*StartRequest) ProtoMessage()
- func (x *StartRequest) ProtoReflect() protoreflect.Message
- func (x *StartRequest) Reset()
- func (x *StartRequest) String() string
- type StatusResponse
- func (*StatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StatusResponse) GetState() MinecraftState
- func (x *StatusResponse) GetUsedmemory() uint64
- func (*StatusResponse) ProtoMessage()
- func (x *StatusResponse) ProtoReflect() protoreflect.Message
- func (x *StatusResponse) Reset()
- func (x *StatusResponse) String() string
- type UnimplementedManagerServer
- func (UnimplementedManagerServer) Lock(context.Context, *Client) (*emptypb.Empty, error)
- func (UnimplementedManagerServer) Login(context.Context, *emptypb.Empty) (*Client, error)
- func (UnimplementedManagerServer) Message(*Client, Manager_MessageServer) error
- func (UnimplementedManagerServer) Start(context.Context, *StartRequest) (*StatusResponse, error)
- func (UnimplementedManagerServer) Status(context.Context, *Client) (*StatusResponse, error)
- func (UnimplementedManagerServer) Stop(context.Context, *Client) (*emptypb.Empty, error)
- func (UnimplementedManagerServer) Unlock(context.Context, *Client) (*emptypb.Empty, error)
- func (UnimplementedManagerServer) Write(context.Context, *WriteRequest) (*emptypb.Empty, error)
- type UnsafeManagerServer
- type WriteRequest
- func (*WriteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WriteRequest) GetClient() *Client
- func (x *WriteRequest) GetContent() string
- func (x *WriteRequest) GetId() uint64
- func (*WriteRequest) ProtoMessage()
- func (x *WriteRequest) ProtoReflect() protoreflect.Message
- func (x *WriteRequest) Reset()
- func (x *WriteRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var ( MinecraftState_name = map[int32]string{ 0: "stopped", 1: "running", } MinecraftState_value = map[string]int32{ "stopped": 0, "running": 1, } )
Enum value maps for MinecraftState.
var File_core_manager_manager_proto protoreflect.FileDescriptor
var Manager_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Manager", HandlerType: (*ManagerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Lock", Handler: _Manager_Lock_Handler, }, { MethodName: "Unlock", Handler: _Manager_Unlock_Handler, }, { MethodName: "Write", Handler: _Manager_Write_Handler, }, { MethodName: "Start", Handler: _Manager_Start_Handler, }, { MethodName: "Stop", Handler: _Manager_Stop_Handler, }, { MethodName: "Status", Handler: _Manager_Status_Handler, }, { MethodName: "Login", Handler: _Manager_Login_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Message", Handler: _Manager_Message_Handler, ServerStreams: true, }, }, Metadata: "core/manager/manager.proto", }
Manager_ServiceDesc is the grpc.ServiceDesc for Manager service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterManagerServer ¶
func RegisterManagerServer(s grpc.ServiceRegistrar, srv ManagerServer)
Types ¶
type Client ¶
type Client struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Client) ProtoReflect ¶
func (x *Client) ProtoReflect() protoreflect.Message
type ManagerClient ¶
type ManagerClient interface { Lock(ctx context.Context, in *Client, opts ...grpc.CallOption) (*emptypb.Empty, error) Unlock(ctx context.Context, in *Client, opts ...grpc.CallOption) (*emptypb.Empty, error) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) Message(ctx context.Context, in *Client, opts ...grpc.CallOption) (Manager_MessageClient, error) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StatusResponse, error) Stop(ctx context.Context, in *Client, opts ...grpc.CallOption) (*emptypb.Empty, error) Status(ctx context.Context, in *Client, opts ...grpc.CallOption) (*StatusResponse, error) Login(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Client, error) }
ManagerClient is the client API for Manager 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 NewManagerClient ¶
func NewManagerClient(cc grpc.ClientConnInterface) ManagerClient
type ManagerServer ¶
type ManagerServer interface { Lock(context.Context, *Client) (*emptypb.Empty, error) Unlock(context.Context, *Client) (*emptypb.Empty, error) Write(context.Context, *WriteRequest) (*emptypb.Empty, error) Message(*Client, Manager_MessageServer) error Start(context.Context, *StartRequest) (*StatusResponse, error) Stop(context.Context, *Client) (*emptypb.Empty, error) Status(context.Context, *Client) (*StatusResponse, error) Login(context.Context, *emptypb.Empty) (*Client, error) // contains filtered or unexported methods }
ManagerServer is the server API for Manager service. All implementations must embed UnimplementedManagerServer for forward compatibility
type Manager_MessageClient ¶
type Manager_MessageClient interface { Recv() (*MessageResponse, error) grpc.ClientStream }
type Manager_MessageServer ¶
type Manager_MessageServer interface { Send(*MessageResponse) error grpc.ServerStream }
type MessageResponse ¶
type MessageResponse struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` Locked bool `protobuf:"varint,4,opt,name=locked,proto3" json:"locked,omitempty"` // contains filtered or unexported fields }
func (*MessageResponse) Descriptor
deprecated
func (*MessageResponse) Descriptor() ([]byte, []int)
Deprecated: Use MessageResponse.ProtoReflect.Descriptor instead.
func (*MessageResponse) GetContent ¶
func (x *MessageResponse) GetContent() string
func (*MessageResponse) GetId ¶
func (x *MessageResponse) GetId() uint64
func (*MessageResponse) GetLocked ¶
func (x *MessageResponse) GetLocked() bool
func (*MessageResponse) GetType ¶
func (x *MessageResponse) GetType() string
func (*MessageResponse) ProtoMessage ¶
func (*MessageResponse) ProtoMessage()
func (*MessageResponse) ProtoReflect ¶
func (x *MessageResponse) ProtoReflect() protoreflect.Message
func (*MessageResponse) Reset ¶
func (x *MessageResponse) Reset()
func (*MessageResponse) String ¶
func (x *MessageResponse) String() string
type MinecraftState ¶
type MinecraftState int32
const ( MinecraftState_stopped MinecraftState = 0 MinecraftState_running MinecraftState = 1 )
func (MinecraftState) Descriptor ¶
func (MinecraftState) Descriptor() protoreflect.EnumDescriptor
func (MinecraftState) Enum ¶
func (x MinecraftState) Enum() *MinecraftState
func (MinecraftState) EnumDescriptor
deprecated
func (MinecraftState) EnumDescriptor() ([]byte, []int)
Deprecated: Use MinecraftState.Descriptor instead.
func (MinecraftState) Number ¶
func (x MinecraftState) Number() protoreflect.EnumNumber
func (MinecraftState) String ¶
func (x MinecraftState) String() string
func (MinecraftState) Type ¶
func (MinecraftState) Type() protoreflect.EnumType
type StartRequest ¶
type StartRequest struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Client *Client `protobuf:"bytes,2,opt,name=client,proto3" json:"client,omitempty"` // contains filtered or unexported fields }
func (*StartRequest) Descriptor
deprecated
func (*StartRequest) Descriptor() ([]byte, []int)
Deprecated: Use StartRequest.ProtoReflect.Descriptor instead.
func (*StartRequest) GetClient ¶
func (x *StartRequest) GetClient() *Client
func (*StartRequest) GetPath ¶
func (x *StartRequest) GetPath() string
func (*StartRequest) ProtoMessage ¶
func (*StartRequest) ProtoMessage()
func (*StartRequest) ProtoReflect ¶
func (x *StartRequest) ProtoReflect() protoreflect.Message
func (*StartRequest) Reset ¶
func (x *StartRequest) Reset()
func (*StartRequest) String ¶
func (x *StartRequest) String() string
type StatusResponse ¶
type StatusResponse struct { State MinecraftState `protobuf:"varint,1,opt,name=state,proto3,enum=MinecraftState" json:"state,omitempty"` Usedmemory uint64 `protobuf:"varint,2,opt,name=usedmemory,proto3" json:"usedmemory,omitempty"` // contains filtered or unexported fields }
func (*StatusResponse) Descriptor
deprecated
func (*StatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) GetState ¶
func (x *StatusResponse) GetState() MinecraftState
func (*StatusResponse) GetUsedmemory ¶
func (x *StatusResponse) GetUsedmemory() uint64
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) ProtoReflect ¶
func (x *StatusResponse) ProtoReflect() protoreflect.Message
func (*StatusResponse) Reset ¶
func (x *StatusResponse) Reset()
func (*StatusResponse) String ¶
func (x *StatusResponse) String() string
type UnimplementedManagerServer ¶
type UnimplementedManagerServer struct { }
UnimplementedManagerServer must be embedded to have forward compatible implementations.
func (UnimplementedManagerServer) Lock ¶
func (UnimplementedManagerServer) Login ¶
func (UnimplementedManagerServer) Message ¶
func (UnimplementedManagerServer) Message(*Client, Manager_MessageServer) error
func (UnimplementedManagerServer) Start ¶
func (UnimplementedManagerServer) Start(context.Context, *StartRequest) (*StatusResponse, error)
func (UnimplementedManagerServer) Status ¶
func (UnimplementedManagerServer) Status(context.Context, *Client) (*StatusResponse, error)
func (UnimplementedManagerServer) Stop ¶
func (UnimplementedManagerServer) Unlock ¶
func (UnimplementedManagerServer) Write ¶
func (UnimplementedManagerServer) Write(context.Context, *WriteRequest) (*emptypb.Empty, error)
type UnsafeManagerServer ¶
type UnsafeManagerServer interface {
// contains filtered or unexported methods
}
UnsafeManagerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ManagerServer will result in compilation errors.
type WriteRequest ¶
type WriteRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` Client *Client `protobuf:"bytes,3,opt,name=client,proto3" json:"client,omitempty"` // contains filtered or unexported fields }
func (*WriteRequest) Descriptor
deprecated
func (*WriteRequest) Descriptor() ([]byte, []int)
Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.
func (*WriteRequest) GetClient ¶
func (x *WriteRequest) GetClient() *Client
func (*WriteRequest) GetContent ¶
func (x *WriteRequest) GetContent() string
func (*WriteRequest) GetId ¶
func (x *WriteRequest) GetId() uint64
func (*WriteRequest) ProtoMessage ¶
func (*WriteRequest) ProtoMessage()
func (*WriteRequest) ProtoReflect ¶
func (x *WriteRequest) ProtoReflect() protoreflect.Message
func (*WriteRequest) Reset ¶
func (x *WriteRequest) Reset()
func (*WriteRequest) String ¶
func (x *WriteRequest) String() string