manager

package
v0.0.0-...-f4d221b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MinecraftState_name = map[int32]string{
		0: "stopped",
		1: "running",
	}
	MinecraftState_value = map[string]int32{
		"stopped": 0,
		"running": 1,
	}
)

Enum value maps for MinecraftState.

View Source
var File_core_manager_manager_proto protoreflect.FileDescriptor
View Source
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) Descriptor deprecated

func (*Client) Descriptor() ([]byte, []int)

Deprecated: Use Client.ProtoReflect.Descriptor instead.

func (*Client) GetId

func (x *Client) GetId() uint64

func (*Client) ProtoMessage

func (*Client) ProtoMessage()

func (*Client) ProtoReflect

func (x *Client) ProtoReflect() protoreflect.Message

func (*Client) Reset

func (x *Client) Reset()

func (*Client) String

func (x *Client) String() string

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) Enum

func (x MinecraftState) Enum() *MinecraftState

func (MinecraftState) EnumDescriptor deprecated

func (MinecraftState) EnumDescriptor() ([]byte, []int)

Deprecated: Use MinecraftState.Descriptor instead.

func (MinecraftState) Number

func (MinecraftState) String

func (x MinecraftState) String() string

func (MinecraftState) Type

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) Start

func (UnimplementedManagerServer) Status

func (UnimplementedManagerServer) Stop

func (UnimplementedManagerServer) Unlock

func (UnimplementedManagerServer) Write

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL