serverstore

package
v0.0.0-...-66adcdc Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerStore_AllocateServer_FullMethodName = "/emortal.grpc.server_store.ServerStore/AllocateServer"
)

Variables

View Source
var File_server_store_grpc_proto protoreflect.FileDescriptor
View Source
var ServerStore_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "emortal.grpc.server_store.ServerStore",
	HandlerType: (*ServerStoreServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AllocateServer",
			Handler:    _ServerStore_AllocateServer_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "server_store/grpc.proto",
}

ServerStore_ServiceDesc is the grpc.ServiceDesc for ServerStore service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServerStoreServer

func RegisterServerStoreServer(s grpc.ServiceRegistrar, srv ServerStoreServer)

Types

type AllocationRequest

type AllocationRequest struct {
	FleetId string `protobuf:"bytes,1,opt,name=fleet_id,json=fleetId,proto3" json:"fleet_id,omitempty"`
	// Types that are assignable to Allocator:
	//
	//	*AllocationRequest_PlayerBased
	//	*AllocationRequest_GameBased
	Allocator isAllocationRequest_Allocator `protobuf_oneof:"allocator"`
	// contains filtered or unexported fields
}

func (*AllocationRequest) Descriptor deprecated

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

Deprecated: Use AllocationRequest.ProtoReflect.Descriptor instead.

func (*AllocationRequest) GetAllocator

func (m *AllocationRequest) GetAllocator() isAllocationRequest_Allocator

func (*AllocationRequest) GetFleetId

func (x *AllocationRequest) GetFleetId() string

func (*AllocationRequest) GetGameBased

func (x *AllocationRequest) GetGameBased() *GameBasedAllocator

func (*AllocationRequest) GetPlayerBased

func (x *AllocationRequest) GetPlayerBased() *PlayerBasedAllocator

func (*AllocationRequest) ProtoMessage

func (*AllocationRequest) ProtoMessage()

func (*AllocationRequest) ProtoReflect

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

func (*AllocationRequest) Reset

func (x *AllocationRequest) Reset()

func (*AllocationRequest) String

func (x *AllocationRequest) String() string

type AllocationRequest_GameBased

type AllocationRequest_GameBased struct {
	GameBased *GameBasedAllocator `protobuf:"bytes,3,opt,name=game_based,json=gameBased,proto3,oneof"`
}

type AllocationRequest_PlayerBased

type AllocationRequest_PlayerBased struct {
	PlayerBased *PlayerBasedAllocator `protobuf:"bytes,2,opt,name=player_based,json=playerBased,proto3,oneof"`
}

type GameBasedAllocator

type GameBasedAllocator struct {
	// contains filtered or unexported fields
}

func (*GameBasedAllocator) Descriptor deprecated

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

Deprecated: Use GameBasedAllocator.ProtoReflect.Descriptor instead.

func (*GameBasedAllocator) ProtoMessage

func (*GameBasedAllocator) ProtoMessage()

func (*GameBasedAllocator) ProtoReflect

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

func (*GameBasedAllocator) Reset

func (x *GameBasedAllocator) Reset()

func (*GameBasedAllocator) String

func (x *GameBasedAllocator) String() string

type PlayerBasedAllocator

type PlayerBasedAllocator struct {

	// player_count is the number of player spaces to allocate on the server
	PlayerCount int32 `protobuf:"varint,1,opt,name=player_count,json=playerCount,proto3" json:"player_count,omitempty"`
	// max_empty_slots is the maximum number of empty slots to allow on the server
	// this exists if you want to try create fuller servers
	MaxEmptySlots int32 `protobuf:"varint,2,opt,name=max_empty_slots,json=maxEmptySlots,proto3" json:"max_empty_slots,omitempty"`
	// contains filtered or unexported fields
}

func (*PlayerBasedAllocator) Descriptor deprecated

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

Deprecated: Use PlayerBasedAllocator.ProtoReflect.Descriptor instead.

func (*PlayerBasedAllocator) GetMaxEmptySlots

func (x *PlayerBasedAllocator) GetMaxEmptySlots() int32

func (*PlayerBasedAllocator) GetPlayerCount

func (x *PlayerBasedAllocator) GetPlayerCount() int32

func (*PlayerBasedAllocator) ProtoMessage

func (*PlayerBasedAllocator) ProtoMessage()

func (*PlayerBasedAllocator) ProtoReflect

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

func (*PlayerBasedAllocator) Reset

func (x *PlayerBasedAllocator) Reset()

func (*PlayerBasedAllocator) String

func (x *PlayerBasedAllocator) String() string

type ServerAllocation

type ServerAllocation struct {
	// contains filtered or unexported fields
}

func (*ServerAllocation) Descriptor deprecated

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

Deprecated: Use ServerAllocation.ProtoReflect.Descriptor instead.

func (*ServerAllocation) ProtoMessage

func (*ServerAllocation) ProtoMessage()

func (*ServerAllocation) ProtoReflect

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

func (*ServerAllocation) Reset

func (x *ServerAllocation) Reset()

func (*ServerAllocation) String

func (x *ServerAllocation) String() string

type ServerStoreClient

type ServerStoreClient interface {
	AllocateServer(ctx context.Context, in *AllocationRequest, opts ...grpc.CallOption) (*ServerAllocation, error)
}

ServerStoreClient is the client API for ServerStore 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.

type ServerStoreServer

type ServerStoreServer interface {
	AllocateServer(context.Context, *AllocationRequest) (*ServerAllocation, error)
	// contains filtered or unexported methods
}

ServerStoreServer is the server API for ServerStore service. All implementations must embed UnimplementedServerStoreServer for forward compatibility.

type UnimplementedServerStoreServer

type UnimplementedServerStoreServer struct{}

UnimplementedServerStoreServer 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.

func (UnimplementedServerStoreServer) AllocateServer

type UnsafeServerStoreServer

type UnsafeServerStoreServer interface {
	// contains filtered or unexported methods
}

UnsafeServerStoreServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServerStoreServer will result in compilation errors.

Jump to

Keyboard shortcuts

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