Documentation
¶
Index ¶
- type AssignShardCommand
- func (c AssignShardCommand) AppendWire(b []byte) []byte
- func (c AssignShardCommand) FromProto(p *pbsystem.AssignShardCommand) AssignShardCommand
- func (c AssignShardCommand) MarshalWire() []byte
- func (AssignShardCommand) Name() string
- func (c AssignShardCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c AssignShardCommand) SizeWire() int
- func (c AssignShardCommand) ToProto() *pbsystem.AssignShardCommand
- func (c AssignShardCommand) UnmarshalWire(data []byte) (any, error)
- type Config
- type CreateLobbyCommand
- func (c CreateLobbyCommand) AppendWire(b []byte) []byte
- func (c CreateLobbyCommand) FromProto(p *pbsystem.CreateLobbyCommand) CreateLobbyCommand
- func (c CreateLobbyCommand) MarshalWire() []byte
- func (CreateLobbyCommand) Name() string
- func (c CreateLobbyCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c CreateLobbyCommand) SizeWire() int
- func (c CreateLobbyCommand) ToProto() *pbsystem.CreateLobbyCommand
- func (c CreateLobbyCommand) UnmarshalWire(data []byte) (any, error)
- type CreateLobbyResult
- func (c CreateLobbyResult) AppendWire(b []byte) []byte
- func (c CreateLobbyResult) FromProto(p *pbsystem.CreateLobbyResult) CreateLobbyResult
- func (c CreateLobbyResult) MarshalWire() []byte
- func (r CreateLobbyResult) Name() string
- func (c CreateLobbyResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c CreateLobbyResult) SizeWire() int
- func (c CreateLobbyResult) ToProto() *pbsystem.CreateLobbyResult
- func (c CreateLobbyResult) UnmarshalWire(data []byte) (any, error)
- type DefaultProvider
- type GenerateInviteCodeCommand
- func (c GenerateInviteCodeCommand) AppendWire(b []byte) []byte
- func (c GenerateInviteCodeCommand) FromProto(p *pbsystem.GenerateInviteCodeCommand) GenerateInviteCodeCommand
- func (c GenerateInviteCodeCommand) MarshalWire() []byte
- func (GenerateInviteCodeCommand) Name() string
- func (c GenerateInviteCodeCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c GenerateInviteCodeCommand) SizeWire() int
- func (c GenerateInviteCodeCommand) ToProto() *pbsystem.GenerateInviteCodeCommand
- func (c GenerateInviteCodeCommand) UnmarshalWire(data []byte) (any, error)
- type GenerateInviteCodeResult
- func (c GenerateInviteCodeResult) AppendWire(b []byte) []byte
- func (c GenerateInviteCodeResult) FromProto(p *pbsystem.GenerateInviteCodeResult) GenerateInviteCodeResult
- func (c GenerateInviteCodeResult) MarshalWire() []byte
- func (r GenerateInviteCodeResult) Name() string
- func (c GenerateInviteCodeResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c GenerateInviteCodeResult) SizeWire() int
- func (c GenerateInviteCodeResult) ToProto() *pbsystem.GenerateInviteCodeResult
- func (c GenerateInviteCodeResult) UnmarshalWire(data []byte) (any, error)
- type GetAllPlayersCommand
- func (c GetAllPlayersCommand) AppendWire(b []byte) []byte
- func (c GetAllPlayersCommand) FromProto(p *pbsystem.GetAllPlayersCommand) GetAllPlayersCommand
- func (c GetAllPlayersCommand) MarshalWire() []byte
- func (GetAllPlayersCommand) Name() string
- func (c GetAllPlayersCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c GetAllPlayersCommand) SizeWire() int
- func (c GetAllPlayersCommand) ToProto() *pbsystem.GetAllPlayersCommand
- func (c GetAllPlayersCommand) UnmarshalWire(data []byte) (any, error)
- type GetAllPlayersResult
- func (c GetAllPlayersResult) AppendWire(b []byte) []byte
- func (c GetAllPlayersResult) FromProto(p *pbsystem.GetAllPlayersResult) GetAllPlayersResult
- func (c GetAllPlayersResult) MarshalWire() []byte
- func (r GetAllPlayersResult) Name() string
- func (c GetAllPlayersResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c GetAllPlayersResult) SizeWire() int
- func (c GetAllPlayersResult) ToProto() *pbsystem.GetAllPlayersResult
- func (c GetAllPlayersResult) UnmarshalWire(data []byte) (any, error)
- type GetLobbyCommand
- func (c GetLobbyCommand) AppendWire(b []byte) []byte
- func (c GetLobbyCommand) FromProto(p *pbsystem.GetLobbyCommand) GetLobbyCommand
- func (c GetLobbyCommand) MarshalWire() []byte
- func (GetLobbyCommand) Name() string
- func (c GetLobbyCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c GetLobbyCommand) SizeWire() int
- func (c GetLobbyCommand) ToProto() *pbsystem.GetLobbyCommand
- func (c GetLobbyCommand) UnmarshalWire(data []byte) (any, error)
- type GetLobbyResult
- func (c GetLobbyResult) AppendWire(b []byte) []byte
- func (c GetLobbyResult) FromProto(p *pbsystem.GetLobbyResult) GetLobbyResult
- func (c GetLobbyResult) MarshalWire() []byte
- func (r GetLobbyResult) Name() string
- func (c GetLobbyResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c GetLobbyResult) SizeWire() int
- func (c GetLobbyResult) ToProto() *pbsystem.GetLobbyResult
- func (c GetLobbyResult) UnmarshalWire(data []byte) (any, error)
- type GetPlayerCommand
- func (c GetPlayerCommand) AppendWire(b []byte) []byte
- func (c GetPlayerCommand) FromProto(p *pbsystem.GetPlayerCommand) GetPlayerCommand
- func (c GetPlayerCommand) MarshalWire() []byte
- func (GetPlayerCommand) Name() string
- func (c GetPlayerCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c GetPlayerCommand) SizeWire() int
- func (c GetPlayerCommand) ToProto() *pbsystem.GetPlayerCommand
- func (c GetPlayerCommand) UnmarshalWire(data []byte) (any, error)
- type GetPlayerResult
- func (c GetPlayerResult) AppendWire(b []byte) []byte
- func (c GetPlayerResult) FromProto(p *pbsystem.GetPlayerResult) GetPlayerResult
- func (c GetPlayerResult) MarshalWire() []byte
- func (r GetPlayerResult) Name() string
- func (c GetPlayerResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c GetPlayerResult) SizeWire() int
- func (c GetPlayerResult) ToProto() *pbsystem.GetPlayerResult
- func (c GetPlayerResult) UnmarshalWire(data []byte) (any, error)
- type HeartbeatCommand
- func (c HeartbeatCommand) AppendWire(b []byte) []byte
- func (c HeartbeatCommand) FromProto(p *pbsystem.HeartbeatCommand) HeartbeatCommand
- func (c HeartbeatCommand) MarshalWire() []byte
- func (HeartbeatCommand) Name() string
- func (c HeartbeatCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c HeartbeatCommand) SizeWire() int
- func (c HeartbeatCommand) ToProto() *pbsystem.HeartbeatCommand
- func (c HeartbeatCommand) UnmarshalWire(data []byte) (any, error)
- type HeartbeatSystem
- type InitSystem
- type InviteCodeGeneratedEvent
- func (c InviteCodeGeneratedEvent) AppendWire(b []byte) []byte
- func (c InviteCodeGeneratedEvent) FromProto(p *pbsystem.InviteCodeGeneratedEvent) InviteCodeGeneratedEvent
- func (c InviteCodeGeneratedEvent) MarshalWire() []byte
- func (InviteCodeGeneratedEvent) Name() string
- func (c InviteCodeGeneratedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c InviteCodeGeneratedEvent) SizeWire() int
- func (c InviteCodeGeneratedEvent) ToProto() *pbsystem.InviteCodeGeneratedEvent
- func (c InviteCodeGeneratedEvent) UnmarshalWire(data []byte) (any, error)
- type JoinLobbyCommand
- func (c JoinLobbyCommand) AppendWire(b []byte) []byte
- func (c JoinLobbyCommand) FromProto(p *pbsystem.JoinLobbyCommand) JoinLobbyCommand
- func (c JoinLobbyCommand) MarshalWire() []byte
- func (JoinLobbyCommand) Name() string
- func (c JoinLobbyCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c JoinLobbyCommand) SizeWire() int
- func (c JoinLobbyCommand) ToProto() *pbsystem.JoinLobbyCommand
- func (c JoinLobbyCommand) UnmarshalWire(data []byte) (any, error)
- type JoinLobbyResult
- func (c JoinLobbyResult) AppendWire(b []byte) []byte
- func (c JoinLobbyResult) FromProto(p *pbsystem.JoinLobbyResult) JoinLobbyResult
- func (c JoinLobbyResult) MarshalWire() []byte
- func (r JoinLobbyResult) Name() string
- func (c JoinLobbyResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c JoinLobbyResult) SizeWire() int
- func (c JoinLobbyResult) ToProto() *pbsystem.JoinLobbyResult
- func (c JoinLobbyResult) UnmarshalWire(data []byte) (any, error)
- type JoinTeamCommand
- func (c JoinTeamCommand) AppendWire(b []byte) []byte
- func (c JoinTeamCommand) FromProto(p *pbsystem.JoinTeamCommand) JoinTeamCommand
- func (c JoinTeamCommand) MarshalWire() []byte
- func (JoinTeamCommand) Name() string
- func (c JoinTeamCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c JoinTeamCommand) SizeWire() int
- func (c JoinTeamCommand) ToProto() *pbsystem.JoinTeamCommand
- func (c JoinTeamCommand) UnmarshalWire(data []byte) (any, error)
- type JoinTeamResult
- func (c JoinTeamResult) AppendWire(b []byte) []byte
- func (c JoinTeamResult) FromProto(p *pbsystem.JoinTeamResult) JoinTeamResult
- func (c JoinTeamResult) MarshalWire() []byte
- func (r JoinTeamResult) Name() string
- func (c JoinTeamResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c JoinTeamResult) SizeWire() int
- func (c JoinTeamResult) ToProto() *pbsystem.JoinTeamResult
- func (c JoinTeamResult) UnmarshalWire(data []byte) (any, error)
- type KickPlayerCommand
- func (c KickPlayerCommand) AppendWire(b []byte) []byte
- func (c KickPlayerCommand) FromProto(p *pbsystem.KickPlayerCommand) KickPlayerCommand
- func (c KickPlayerCommand) MarshalWire() []byte
- func (KickPlayerCommand) Name() string
- func (c KickPlayerCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c KickPlayerCommand) SizeWire() int
- func (c KickPlayerCommand) ToProto() *pbsystem.KickPlayerCommand
- func (c KickPlayerCommand) UnmarshalWire(data []byte) (any, error)
- type KickPlayerResult
- func (c KickPlayerResult) AppendWire(b []byte) []byte
- func (c KickPlayerResult) FromProto(p *pbsystem.KickPlayerResult) KickPlayerResult
- func (c KickPlayerResult) MarshalWire() []byte
- func (r KickPlayerResult) Name() string
- func (c KickPlayerResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c KickPlayerResult) SizeWire() int
- func (c KickPlayerResult) ToProto() *pbsystem.KickPlayerResult
- func (c KickPlayerResult) UnmarshalWire(data []byte) (any, error)
- type LeaderChangedEvent
- func (c LeaderChangedEvent) AppendWire(b []byte) []byte
- func (c LeaderChangedEvent) FromProto(p *pbsystem.LeaderChangedEvent) LeaderChangedEvent
- func (c LeaderChangedEvent) MarshalWire() []byte
- func (LeaderChangedEvent) Name() string
- func (c LeaderChangedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c LeaderChangedEvent) SizeWire() int
- func (c LeaderChangedEvent) ToProto() *pbsystem.LeaderChangedEvent
- func (c LeaderChangedEvent) UnmarshalWire(data []byte) (any, error)
- type LeaveLobbyCommand
- func (c LeaveLobbyCommand) AppendWire(b []byte) []byte
- func (c LeaveLobbyCommand) FromProto(p *pbsystem.LeaveLobbyCommand) LeaveLobbyCommand
- func (c LeaveLobbyCommand) MarshalWire() []byte
- func (LeaveLobbyCommand) Name() string
- func (c LeaveLobbyCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c LeaveLobbyCommand) SizeWire() int
- func (c LeaveLobbyCommand) ToProto() *pbsystem.LeaveLobbyCommand
- func (c LeaveLobbyCommand) UnmarshalWire(data []byte) (any, error)
- type LeaveLobbyResult
- func (c LeaveLobbyResult) AppendWire(b []byte) []byte
- func (c LeaveLobbyResult) FromProto(p *pbsystem.LeaveLobbyResult) LeaveLobbyResult
- func (c LeaveLobbyResult) MarshalWire() []byte
- func (r LeaveLobbyResult) Name() string
- func (c LeaveLobbyResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c LeaveLobbyResult) SizeWire() int
- func (c LeaveLobbyResult) ToProto() *pbsystem.LeaveLobbyResult
- func (c LeaveLobbyResult) UnmarshalWire(data []byte) (any, error)
- type LobbyCreatedEvent
- func (c LobbyCreatedEvent) AppendWire(b []byte) []byte
- func (c LobbyCreatedEvent) FromProto(p *pbsystem.LobbyCreatedEvent) LobbyCreatedEvent
- func (c LobbyCreatedEvent) MarshalWire() []byte
- func (LobbyCreatedEvent) Name() string
- func (c LobbyCreatedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c LobbyCreatedEvent) SizeWire() int
- func (c LobbyCreatedEvent) ToProto() *pbsystem.LobbyCreatedEvent
- func (c LobbyCreatedEvent) UnmarshalWire(data []byte) (any, error)
- type LobbyDeletedEvent
- func (c LobbyDeletedEvent) AppendWire(b []byte) []byte
- func (c LobbyDeletedEvent) FromProto(p *pbsystem.LobbyDeletedEvent) LobbyDeletedEvent
- func (c LobbyDeletedEvent) MarshalWire() []byte
- func (LobbyDeletedEvent) Name() string
- func (c LobbyDeletedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c LobbyDeletedEvent) SizeWire() int
- func (c LobbyDeletedEvent) ToProto() *pbsystem.LobbyDeletedEvent
- func (c LobbyDeletedEvent) UnmarshalWire(data []byte) (any, error)
- type LobbyProvider
- type LobbySystem
- type NotifySessionEndCommand
- func (c NotifySessionEndCommand) AppendWire(b []byte) []byte
- func (c NotifySessionEndCommand) FromProto(p *pbsystem.NotifySessionEndCommand) NotifySessionEndCommand
- func (c NotifySessionEndCommand) MarshalWire() []byte
- func (NotifySessionEndCommand) Name() string
- func (c NotifySessionEndCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c NotifySessionEndCommand) SizeWire() int
- func (c NotifySessionEndCommand) ToProto() *pbsystem.NotifySessionEndCommand
- func (c NotifySessionEndCommand) UnmarshalWire(data []byte) (any, error)
- type NotifySessionStartCommand
- func (c NotifySessionStartCommand) AppendWire(b []byte) []byte
- func (c NotifySessionStartCommand) FromProto(p *pbsystem.NotifySessionStartCommand) NotifySessionStartCommand
- func (c NotifySessionStartCommand) MarshalWire() []byte
- func (NotifySessionStartCommand) Name() string
- func (c NotifySessionStartCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c NotifySessionStartCommand) SizeWire() int
- func (c NotifySessionStartCommand) ToProto() *pbsystem.NotifySessionStartCommand
- func (c NotifySessionStartCommand) UnmarshalWire(data []byte) (any, error)
- type PlayerChangedTeamEvent
- func (c PlayerChangedTeamEvent) AppendWire(b []byte) []byte
- func (c PlayerChangedTeamEvent) FromProto(p *pbsystem.PlayerChangedTeamEvent) PlayerChangedTeamEvent
- func (c PlayerChangedTeamEvent) MarshalWire() []byte
- func (PlayerChangedTeamEvent) Name() string
- func (c PlayerChangedTeamEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c PlayerChangedTeamEvent) SizeWire() int
- func (c PlayerChangedTeamEvent) ToProto() *pbsystem.PlayerChangedTeamEvent
- func (c PlayerChangedTeamEvent) UnmarshalWire(data []byte) (any, error)
- type PlayerJoinedEvent
- func (c PlayerJoinedEvent) AppendWire(b []byte) []byte
- func (c PlayerJoinedEvent) FromProto(p *pbsystem.PlayerJoinedEvent) PlayerJoinedEvent
- func (c PlayerJoinedEvent) MarshalWire() []byte
- func (PlayerJoinedEvent) Name() string
- func (c PlayerJoinedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c PlayerJoinedEvent) SizeWire() int
- func (c PlayerJoinedEvent) ToProto() *pbsystem.PlayerJoinedEvent
- func (c PlayerJoinedEvent) UnmarshalWire(data []byte) (any, error)
- type PlayerKickedEvent
- func (c PlayerKickedEvent) AppendWire(b []byte) []byte
- func (c PlayerKickedEvent) FromProto(p *pbsystem.PlayerKickedEvent) PlayerKickedEvent
- func (c PlayerKickedEvent) MarshalWire() []byte
- func (PlayerKickedEvent) Name() string
- func (c PlayerKickedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c PlayerKickedEvent) SizeWire() int
- func (c PlayerKickedEvent) ToProto() *pbsystem.PlayerKickedEvent
- func (c PlayerKickedEvent) UnmarshalWire(data []byte) (any, error)
- type PlayerLeftEvent
- func (c PlayerLeftEvent) AppendWire(b []byte) []byte
- func (c PlayerLeftEvent) FromProto(p *pbsystem.PlayerLeftEvent) PlayerLeftEvent
- func (c PlayerLeftEvent) MarshalWire() []byte
- func (PlayerLeftEvent) Name() string
- func (c PlayerLeftEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c PlayerLeftEvent) SizeWire() int
- func (c PlayerLeftEvent) ToProto() *pbsystem.PlayerLeftEvent
- func (c PlayerLeftEvent) UnmarshalWire(data []byte) (any, error)
- type PlayerPassthroughUpdatedEvent
- func (c PlayerPassthroughUpdatedEvent) AppendWire(b []byte) []byte
- func (c PlayerPassthroughUpdatedEvent) FromProto(p *pbsystem.PlayerPassthroughUpdatedEvent) PlayerPassthroughUpdatedEvent
- func (c PlayerPassthroughUpdatedEvent) MarshalWire() []byte
- func (PlayerPassthroughUpdatedEvent) Name() string
- func (c PlayerPassthroughUpdatedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c PlayerPassthroughUpdatedEvent) SizeWire() int
- func (c PlayerPassthroughUpdatedEvent) ToProto() *pbsystem.PlayerPassthroughUpdatedEvent
- func (c PlayerPassthroughUpdatedEvent) UnmarshalWire(data []byte) (any, error)
- type PlayerReadyEvent
- func (c PlayerReadyEvent) AppendWire(b []byte) []byte
- func (c PlayerReadyEvent) FromProto(p *pbsystem.PlayerReadyEvent) PlayerReadyEvent
- func (c PlayerReadyEvent) MarshalWire() []byte
- func (PlayerReadyEvent) Name() string
- func (c PlayerReadyEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c PlayerReadyEvent) SizeWire() int
- func (c PlayerReadyEvent) ToProto() *pbsystem.PlayerReadyEvent
- func (c PlayerReadyEvent) UnmarshalWire(data []byte) (any, error)
- type PlayerTimedOutEvent
- func (c PlayerTimedOutEvent) AppendWire(b []byte) []byte
- func (c PlayerTimedOutEvent) FromProto(p *pbsystem.PlayerTimedOutEvent) PlayerTimedOutEvent
- func (c PlayerTimedOutEvent) MarshalWire() []byte
- func (PlayerTimedOutEvent) Name() string
- func (c PlayerTimedOutEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c PlayerTimedOutEvent) SizeWire() int
- func (c PlayerTimedOutEvent) ToProto() *pbsystem.PlayerTimedOutEvent
- func (c PlayerTimedOutEvent) UnmarshalWire(data []byte) (any, error)
- type Runtime
- type SessionAwaitingAllocationEvent
- func (c SessionAwaitingAllocationEvent) AppendWire(b []byte) []byte
- func (c SessionAwaitingAllocationEvent) FromProto(p *pbsystem.SessionAwaitingAllocationEvent) SessionAwaitingAllocationEvent
- func (c SessionAwaitingAllocationEvent) MarshalWire() []byte
- func (SessionAwaitingAllocationEvent) Name() string
- func (c SessionAwaitingAllocationEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c SessionAwaitingAllocationEvent) SizeWire() int
- func (c SessionAwaitingAllocationEvent) ToProto() *pbsystem.SessionAwaitingAllocationEvent
- func (c SessionAwaitingAllocationEvent) UnmarshalWire(data []byte) (any, error)
- type SessionEndedEvent
- func (c SessionEndedEvent) AppendWire(b []byte) []byte
- func (c SessionEndedEvent) FromProto(p *pbsystem.SessionEndedEvent) SessionEndedEvent
- func (c SessionEndedEvent) MarshalWire() []byte
- func (SessionEndedEvent) Name() string
- func (c SessionEndedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c SessionEndedEvent) SizeWire() int
- func (c SessionEndedEvent) ToProto() *pbsystem.SessionEndedEvent
- func (c SessionEndedEvent) UnmarshalWire(data []byte) (any, error)
- type SessionPassthroughUpdatedEvent
- func (c SessionPassthroughUpdatedEvent) AppendWire(b []byte) []byte
- func (c SessionPassthroughUpdatedEvent) FromProto(p *pbsystem.SessionPassthroughUpdatedEvent) SessionPassthroughUpdatedEvent
- func (c SessionPassthroughUpdatedEvent) MarshalWire() []byte
- func (SessionPassthroughUpdatedEvent) Name() string
- func (c SessionPassthroughUpdatedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c SessionPassthroughUpdatedEvent) SizeWire() int
- func (c SessionPassthroughUpdatedEvent) ToProto() *pbsystem.SessionPassthroughUpdatedEvent
- func (c SessionPassthroughUpdatedEvent) UnmarshalWire(data []byte) (any, error)
- type SessionStartedEvent
- func (c SessionStartedEvent) AppendWire(b []byte) []byte
- func (c SessionStartedEvent) FromProto(p *pbsystem.SessionStartedEvent) SessionStartedEvent
- func (c SessionStartedEvent) MarshalWire() []byte
- func (SessionStartedEvent) Name() string
- func (c SessionStartedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c SessionStartedEvent) SizeWire() int
- func (c SessionStartedEvent) ToProto() *pbsystem.SessionStartedEvent
- func (c SessionStartedEvent) UnmarshalWire(data []byte) (any, error)
- type SetReadyCommand
- func (c SetReadyCommand) AppendWire(b []byte) []byte
- func (c SetReadyCommand) FromProto(p *pbsystem.SetReadyCommand) SetReadyCommand
- func (c SetReadyCommand) MarshalWire() []byte
- func (SetReadyCommand) Name() string
- func (c SetReadyCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c SetReadyCommand) SizeWire() int
- func (c SetReadyCommand) ToProto() *pbsystem.SetReadyCommand
- func (c SetReadyCommand) UnmarshalWire(data []byte) (any, error)
- type SetReadyResult
- func (c SetReadyResult) AppendWire(b []byte) []byte
- func (c SetReadyResult) FromProto(p *pbsystem.SetReadyResult) SetReadyResult
- func (c SetReadyResult) MarshalWire() []byte
- func (r SetReadyResult) Name() string
- func (c SetReadyResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c SetReadyResult) SizeWire() int
- func (c SetReadyResult) ToProto() *pbsystem.SetReadyResult
- func (c SetReadyResult) UnmarshalWire(data []byte) (any, error)
- type StartSessionCommand
- func (c StartSessionCommand) AppendWire(b []byte) []byte
- func (c StartSessionCommand) FromProto(p *pbsystem.StartSessionCommand) StartSessionCommand
- func (c StartSessionCommand) MarshalWire() []byte
- func (StartSessionCommand) Name() string
- func (c StartSessionCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c StartSessionCommand) SizeWire() int
- func (c StartSessionCommand) ToProto() *pbsystem.StartSessionCommand
- func (c StartSessionCommand) UnmarshalWire(data []byte) (any, error)
- type StartSessionPayload
- type StartSessionResult
- func (c StartSessionResult) AppendWire(b []byte) []byte
- func (c StartSessionResult) FromProto(p *pbsystem.StartSessionResult) StartSessionResult
- func (c StartSessionResult) MarshalWire() []byte
- func (r StartSessionResult) Name() string
- func (c StartSessionResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c StartSessionResult) SizeWire() int
- func (c StartSessionResult) ToProto() *pbsystem.StartSessionResult
- func (c StartSessionResult) UnmarshalWire(data []byte) (any, error)
- type TeamConfig
- type TransferLeaderCommand
- func (c TransferLeaderCommand) AppendWire(b []byte) []byte
- func (c TransferLeaderCommand) FromProto(p *pbsystem.TransferLeaderCommand) TransferLeaderCommand
- func (c TransferLeaderCommand) MarshalWire() []byte
- func (TransferLeaderCommand) Name() string
- func (c TransferLeaderCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c TransferLeaderCommand) SizeWire() int
- func (c TransferLeaderCommand) ToProto() *pbsystem.TransferLeaderCommand
- func (c TransferLeaderCommand) UnmarshalWire(data []byte) (any, error)
- type TransferLeaderResult
- func (c TransferLeaderResult) AppendWire(b []byte) []byte
- func (c TransferLeaderResult) FromProto(p *pbsystem.TransferLeaderResult) TransferLeaderResult
- func (c TransferLeaderResult) MarshalWire() []byte
- func (r TransferLeaderResult) Name() string
- func (c TransferLeaderResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c TransferLeaderResult) SizeWire() int
- func (c TransferLeaderResult) ToProto() *pbsystem.TransferLeaderResult
- func (c TransferLeaderResult) UnmarshalWire(data []byte) (any, error)
- type UpdatePlayerPassthroughCommand
- func (c UpdatePlayerPassthroughCommand) AppendWire(b []byte) []byte
- func (c UpdatePlayerPassthroughCommand) FromProto(p *pbsystem.UpdatePlayerPassthroughCommand) UpdatePlayerPassthroughCommand
- func (c UpdatePlayerPassthroughCommand) MarshalWire() []byte
- func (UpdatePlayerPassthroughCommand) Name() string
- func (c UpdatePlayerPassthroughCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c UpdatePlayerPassthroughCommand) SizeWire() int
- func (c UpdatePlayerPassthroughCommand) ToProto() *pbsystem.UpdatePlayerPassthroughCommand
- func (c UpdatePlayerPassthroughCommand) UnmarshalWire(data []byte) (any, error)
- type UpdatePlayerPassthroughResult
- func (c UpdatePlayerPassthroughResult) AppendWire(b []byte) []byte
- func (c UpdatePlayerPassthroughResult) FromProto(p *pbsystem.UpdatePlayerPassthroughResult) UpdatePlayerPassthroughResult
- func (c UpdatePlayerPassthroughResult) MarshalWire() []byte
- func (r UpdatePlayerPassthroughResult) Name() string
- func (c UpdatePlayerPassthroughResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c UpdatePlayerPassthroughResult) SizeWire() int
- func (c UpdatePlayerPassthroughResult) ToProto() *pbsystem.UpdatePlayerPassthroughResult
- func (c UpdatePlayerPassthroughResult) UnmarshalWire(data []byte) (any, error)
- type UpdateSessionPassthroughCommand
- func (c UpdateSessionPassthroughCommand) AppendWire(b []byte) []byte
- func (c UpdateSessionPassthroughCommand) FromProto(p *pbsystem.UpdateSessionPassthroughCommand) UpdateSessionPassthroughCommand
- func (c UpdateSessionPassthroughCommand) MarshalWire() []byte
- func (UpdateSessionPassthroughCommand) Name() string
- func (c UpdateSessionPassthroughCommand) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c UpdateSessionPassthroughCommand) SizeWire() int
- func (c UpdateSessionPassthroughCommand) ToProto() *pbsystem.UpdateSessionPassthroughCommand
- func (c UpdateSessionPassthroughCommand) UnmarshalWire(data []byte) (any, error)
- type UpdateSessionPassthroughResult
- func (c UpdateSessionPassthroughResult) AppendWire(b []byte) []byte
- func (c UpdateSessionPassthroughResult) FromProto(p *pbsystem.UpdateSessionPassthroughResult) UpdateSessionPassthroughResult
- func (c UpdateSessionPassthroughResult) MarshalWire() []byte
- func (r UpdateSessionPassthroughResult) Name() string
- func (c UpdateSessionPassthroughResult) ProtoDescriptor() protoreflect.MessageDescriptor
- func (c UpdateSessionPassthroughResult) SizeWire() int
- func (c UpdateSessionPassthroughResult) ToProto() *pbsystem.UpdateSessionPassthroughResult
- func (c UpdateSessionPassthroughResult) UnmarshalWire(data []byte) (any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignShardCommand ¶
type AssignShardCommand struct {
LobbyID string `json:"lobby_id"`
RequestID string `json:"request_id"`
GameWorld component.ShardAddress `json:"game_world"`
Reason string `json:"reason,omitempty"`
}
AssignShardCommand is sent by an external orchestrator to complete a session start that is waiting in SessionStateAwaitingAllocation. The lobby writes GameWorld directly onto the lobby component, transitions to SessionStateInSession, and dispatches NotifySessionStartCommand. The orchestrator is responsible for providing a complete GameWorld address (Region, Organization, Project, ShardID).
If GameWorld.ShardID is empty, the assignment is treated as a failure: the lobby returns to SessionStateIdle and a failure StartSessionResult is emitted with Reason as the failure message.
RequestID must equal the lobby's current Session.PendingRequestID (which the orchestrator reads from the LobbyComponent). Mismatched RequestIDs are rejected; this rejects late duplicate or stale commands that arrive after the original pending cycle has already been completed or cancelled.
func (AssignShardCommand) AppendWire ¶ added in v0.16.9
func (c AssignShardCommand) AppendWire(b []byte) []byte
func (AssignShardCommand) FromProto ¶ added in v0.14.0
func (c AssignShardCommand) FromProto(p *pbsystem.AssignShardCommand) AssignShardCommand
func (AssignShardCommand) MarshalWire ¶ added in v0.15.0
func (c AssignShardCommand) MarshalWire() []byte
func (AssignShardCommand) Name ¶
func (AssignShardCommand) Name() string
Name returns the command name.
func (AssignShardCommand) ProtoDescriptor ¶ added in v0.16.4
func (c AssignShardCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (AssignShardCommand) SizeWire ¶ added in v0.16.9
func (c AssignShardCommand) SizeWire() int
func (AssignShardCommand) ToProto ¶ added in v0.14.0
func (c AssignShardCommand) ToProto() *pbsystem.AssignShardCommand
func (AssignShardCommand) UnmarshalWire ¶ added in v0.15.0
func (c AssignShardCommand) UnmarshalWire(data []byte) (any, error)
type Config ¶ added in v0.16.5
type Config struct {
// LobbyWorld is this lobby shard's address (for game shard to send NotifySessionEndCommand back).
LobbyWorld component.ShardAddress `json:"lobby_world"`
// HeartbeatTimeout is how long (in seconds) before a player is removed for not sending heartbeats.
// Clients should send heartbeats more frequently than this (e.g., every timeout/3 seconds).
// Default: 30 seconds.
HeartbeatTimeout int64 `json:"heartbeat_timeout"`
// AssignmentAuthority is an accident-prevention filter, NOT an
// authentication boundary. The plugin compares it against the sending shard
// and drops mismatches. This prevents an unrelated system that
// happens to send AssignShardCommand from accidentally completing the
// wrong lobby's session start. Clients cannot send as a shard, but it
// does NOT defend against a service on NATS that names another
// sender, because the sender address is not signature-verified. Real
// authentication must live above the plugin (NATS ACLs). Empty = no
// filter.
AssignmentAuthority string `json:"assignment_authority,omitempty"`
// MaxAllocationTimeout bounds how long (in seconds) a lobby may remain
// in SessionStateAwaitingAllocation before the lobby shard fails the
// start itself and returns to Idle. Values <= 0 disable timeout
// enforcement entirely.
MaxAllocationTimeout int64 `json:"max_allocation_timeout,omitempty"`
}
Config is the runtime configuration the systems read, supplied by the shard's main.go through the lobby plugin at registration.
It lives here rather than in the component package because it is not a component: it has no Name(), is wired to no system, never becomes an entity, and is never snapshotted. The component package holds only types that are actually stored in the world.
type CreateLobbyCommand ¶
type CreateLobbyCommand struct {
RequestID string `json:"request_id"` // For matching request/response
// Preset is the label of a server-registered team configuration.
Preset string `json:"preset"`
// PlayerPassthroughData is opaque client JSON for the creating player, relayed to other clients.
PlayerPassthroughData string `json:"player_passthrough_data,omitempty"`
// SessionPassthroughData is opaque client JSON for the lobby session, relayed to other clients.
SessionPassthroughData string `json:"session_passthrough_data,omitempty"`
}
CreateLobbyCommand creates a new lobby with the sender as leader. The server resolves Preset against lobby.Config.LobbyPresets and rejects unknown or empty preset labels. Clients cannot supply arbitrary team configuration; the server is the source of truth.
The target game shard is not specified here: it is assigned later by an external orchestrator via AssignShardCommand when the session starts.
func (CreateLobbyCommand) AppendWire ¶ added in v0.16.9
func (c CreateLobbyCommand) AppendWire(b []byte) []byte
func (CreateLobbyCommand) FromProto ¶ added in v0.14.0
func (c CreateLobbyCommand) FromProto(p *pbsystem.CreateLobbyCommand) CreateLobbyCommand
func (CreateLobbyCommand) MarshalWire ¶ added in v0.15.0
func (c CreateLobbyCommand) MarshalWire() []byte
func (CreateLobbyCommand) Name ¶
func (CreateLobbyCommand) Name() string
Name returns the command name.
func (CreateLobbyCommand) ProtoDescriptor ¶ added in v0.16.4
func (c CreateLobbyCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (CreateLobbyCommand) SizeWire ¶ added in v0.16.9
func (c CreateLobbyCommand) SizeWire() int
func (CreateLobbyCommand) ToProto ¶ added in v0.14.0
func (c CreateLobbyCommand) ToProto() *pbsystem.CreateLobbyCommand
func (CreateLobbyCommand) UnmarshalWire ¶ added in v0.15.0
func (c CreateLobbyCommand) UnmarshalWire(data []byte) (any, error)
type CreateLobbyResult ¶
type CreateLobbyResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
Lobby component.LobbyComponent `json:"lobby"`
Player component.PlayerComponent `json:"player"`
}
CreateLobbyResult is sent back to the client after CreateLobbyCommand.
func (CreateLobbyResult) AppendWire ¶ added in v0.16.9
func (c CreateLobbyResult) AppendWire(b []byte) []byte
func (CreateLobbyResult) FromProto ¶ added in v0.15.0
func (c CreateLobbyResult) FromProto(p *pbsystem.CreateLobbyResult) CreateLobbyResult
func (CreateLobbyResult) MarshalWire ¶ added in v0.15.0
func (c CreateLobbyResult) MarshalWire() []byte
func (CreateLobbyResult) Name ¶
func (r CreateLobbyResult) Name() string
Name returns the request-prefixed event name.
func (CreateLobbyResult) ProtoDescriptor ¶ added in v0.16.4
func (c CreateLobbyResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (CreateLobbyResult) SizeWire ¶ added in v0.16.9
func (c CreateLobbyResult) SizeWire() int
func (CreateLobbyResult) ToProto ¶ added in v0.15.0
func (c CreateLobbyResult) ToProto() *pbsystem.CreateLobbyResult
func (CreateLobbyResult) UnmarshalWire ¶ added in v0.15.0
func (c CreateLobbyResult) UnmarshalWire(data []byte) (any, error)
type DefaultProvider ¶
type DefaultProvider struct{}
DefaultProvider provides default implementations.
func (DefaultProvider) GenerateInviteCode ¶
func (DefaultProvider) GenerateInviteCode(lobby *component.LobbyComponent, seed int64) string
GenerateInviteCode generates a 6-character invite code from Hash(LobbyID + seed). Pure in (lobby, seed): the caller owns the clock and must vary seed per attempt.
func (DefaultProvider) ValidateJoin ¶
func (DefaultProvider) ValidateJoin(*component.LobbyComponent, JoinLobbyCommand) (bool, string)
ValidateJoin accepts all joins by default. Games override this to enforce per-game requirements (version, region, level, etc.).
type GenerateInviteCodeCommand ¶
type GenerateInviteCodeCommand struct {
RequestID string `json:"request_id"` // For matching request/response
}
GenerateInviteCodeCommand generates a new invite code (leader only).
func (GenerateInviteCodeCommand) AppendWire ¶ added in v0.16.9
func (c GenerateInviteCodeCommand) AppendWire(b []byte) []byte
func (GenerateInviteCodeCommand) FromProto ¶ added in v0.14.0
func (c GenerateInviteCodeCommand) FromProto(p *pbsystem.GenerateInviteCodeCommand) GenerateInviteCodeCommand
func (GenerateInviteCodeCommand) MarshalWire ¶ added in v0.15.0
func (c GenerateInviteCodeCommand) MarshalWire() []byte
func (GenerateInviteCodeCommand) Name ¶
func (GenerateInviteCodeCommand) Name() string
Name returns the command name.
func (GenerateInviteCodeCommand) ProtoDescriptor ¶ added in v0.16.4
func (c GenerateInviteCodeCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (GenerateInviteCodeCommand) SizeWire ¶ added in v0.16.9
func (c GenerateInviteCodeCommand) SizeWire() int
func (GenerateInviteCodeCommand) ToProto ¶ added in v0.14.0
func (c GenerateInviteCodeCommand) ToProto() *pbsystem.GenerateInviteCodeCommand
func (GenerateInviteCodeCommand) UnmarshalWire ¶ added in v0.15.0
func (c GenerateInviteCodeCommand) UnmarshalWire(data []byte) (any, error)
type GenerateInviteCodeResult ¶
type GenerateInviteCodeResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
InviteCode string `json:"invite_code,omitempty"`
}
GenerateInviteCodeResult is sent back to the client after GenerateInviteCodeCommand.
func (GenerateInviteCodeResult) AppendWire ¶ added in v0.16.9
func (c GenerateInviteCodeResult) AppendWire(b []byte) []byte
func (GenerateInviteCodeResult) FromProto ¶ added in v0.15.0
func (c GenerateInviteCodeResult) FromProto(p *pbsystem.GenerateInviteCodeResult) GenerateInviteCodeResult
func (GenerateInviteCodeResult) MarshalWire ¶ added in v0.15.0
func (c GenerateInviteCodeResult) MarshalWire() []byte
func (GenerateInviteCodeResult) Name ¶
func (r GenerateInviteCodeResult) Name() string
Name returns the request-prefixed event name.
func (GenerateInviteCodeResult) ProtoDescriptor ¶ added in v0.16.4
func (c GenerateInviteCodeResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (GenerateInviteCodeResult) SizeWire ¶ added in v0.16.9
func (c GenerateInviteCodeResult) SizeWire() int
func (GenerateInviteCodeResult) ToProto ¶ added in v0.15.0
func (c GenerateInviteCodeResult) ToProto() *pbsystem.GenerateInviteCodeResult
func (GenerateInviteCodeResult) UnmarshalWire ¶ added in v0.15.0
func (c GenerateInviteCodeResult) UnmarshalWire(data []byte) (any, error)
type GetAllPlayersCommand ¶
type GetAllPlayersCommand struct {
RequestID string `json:"request_id"` // For matching request/response
}
GetAllPlayersCommand fetches all players in the caller's lobby.
func (GetAllPlayersCommand) AppendWire ¶ added in v0.16.9
func (c GetAllPlayersCommand) AppendWire(b []byte) []byte
func (GetAllPlayersCommand) FromProto ¶ added in v0.14.0
func (c GetAllPlayersCommand) FromProto(p *pbsystem.GetAllPlayersCommand) GetAllPlayersCommand
func (GetAllPlayersCommand) MarshalWire ¶ added in v0.15.0
func (c GetAllPlayersCommand) MarshalWire() []byte
func (GetAllPlayersCommand) Name ¶
func (GetAllPlayersCommand) Name() string
Name returns the command name.
func (GetAllPlayersCommand) ProtoDescriptor ¶ added in v0.16.4
func (c GetAllPlayersCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (GetAllPlayersCommand) SizeWire ¶ added in v0.16.9
func (c GetAllPlayersCommand) SizeWire() int
func (GetAllPlayersCommand) ToProto ¶ added in v0.14.0
func (c GetAllPlayersCommand) ToProto() *pbsystem.GetAllPlayersCommand
func (GetAllPlayersCommand) UnmarshalWire ¶ added in v0.15.0
func (c GetAllPlayersCommand) UnmarshalWire(data []byte) (any, error)
type GetAllPlayersResult ¶
type GetAllPlayersResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
Players [component.MaxLobbyPlayers]component.PlayerComponent `json:"players,omitempty"`
PlayersCount int `json:"players_count"`
}
GetAllPlayersResult is sent back to the client after GetAllPlayersCommand.
func (GetAllPlayersResult) AppendWire ¶ added in v0.16.9
func (c GetAllPlayersResult) AppendWire(b []byte) []byte
func (GetAllPlayersResult) FromProto ¶ added in v0.15.0
func (c GetAllPlayersResult) FromProto(p *pbsystem.GetAllPlayersResult) GetAllPlayersResult
func (GetAllPlayersResult) MarshalWire ¶ added in v0.15.0
func (c GetAllPlayersResult) MarshalWire() []byte
func (GetAllPlayersResult) Name ¶
func (r GetAllPlayersResult) Name() string
Name returns the request-prefixed event name.
func (GetAllPlayersResult) ProtoDescriptor ¶ added in v0.16.4
func (c GetAllPlayersResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (GetAllPlayersResult) SizeWire ¶ added in v0.16.9
func (c GetAllPlayersResult) SizeWire() int
func (GetAllPlayersResult) ToProto ¶ added in v0.15.0
func (c GetAllPlayersResult) ToProto() *pbsystem.GetAllPlayersResult
func (GetAllPlayersResult) UnmarshalWire ¶ added in v0.15.0
func (c GetAllPlayersResult) UnmarshalWire(data []byte) (any, error)
type GetLobbyCommand ¶
type GetLobbyCommand struct {
RequestID string `json:"request_id"` // For matching request/response
}
GetLobbyCommand fetches the caller's current lobby snapshot. Used by reconnecting clients to restore their full view (teams, session state, assigned GameWorld, etc.) in a single round-trip.
func (GetLobbyCommand) AppendWire ¶ added in v0.16.9
func (c GetLobbyCommand) AppendWire(b []byte) []byte
func (GetLobbyCommand) FromProto ¶ added in v0.14.0
func (c GetLobbyCommand) FromProto(p *pbsystem.GetLobbyCommand) GetLobbyCommand
func (GetLobbyCommand) MarshalWire ¶ added in v0.15.0
func (c GetLobbyCommand) MarshalWire() []byte
func (GetLobbyCommand) ProtoDescriptor ¶ added in v0.16.4
func (c GetLobbyCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (GetLobbyCommand) SizeWire ¶ added in v0.16.9
func (c GetLobbyCommand) SizeWire() int
func (GetLobbyCommand) ToProto ¶ added in v0.14.0
func (c GetLobbyCommand) ToProto() *pbsystem.GetLobbyCommand
func (GetLobbyCommand) UnmarshalWire ¶ added in v0.15.0
func (c GetLobbyCommand) UnmarshalWire(data []byte) (any, error)
type GetLobbyResult ¶
type GetLobbyResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
Lobby component.LobbyComponent `json:"lobby"`
}
GetLobbyResult is sent back to the client after GetLobbyCommand.
func (GetLobbyResult) AppendWire ¶ added in v0.16.9
func (c GetLobbyResult) AppendWire(b []byte) []byte
func (GetLobbyResult) FromProto ¶ added in v0.15.0
func (c GetLobbyResult) FromProto(p *pbsystem.GetLobbyResult) GetLobbyResult
func (GetLobbyResult) MarshalWire ¶ added in v0.15.0
func (c GetLobbyResult) MarshalWire() []byte
func (GetLobbyResult) Name ¶
func (r GetLobbyResult) Name() string
Name returns the request-prefixed event name.
func (GetLobbyResult) ProtoDescriptor ¶ added in v0.16.4
func (c GetLobbyResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (GetLobbyResult) SizeWire ¶ added in v0.16.9
func (c GetLobbyResult) SizeWire() int
func (GetLobbyResult) ToProto ¶ added in v0.15.0
func (c GetLobbyResult) ToProto() *pbsystem.GetLobbyResult
func (GetLobbyResult) UnmarshalWire ¶ added in v0.15.0
func (c GetLobbyResult) UnmarshalWire(data []byte) (any, error)
type GetPlayerCommand ¶
type GetPlayerCommand struct {
RequestID string `json:"request_id"` // For matching request/response
PlayerID string `json:"player_id"` // Target player ID (empty = self)
}
GetPlayerCommand fetches a specific player's component data.
func (GetPlayerCommand) AppendWire ¶ added in v0.16.9
func (c GetPlayerCommand) AppendWire(b []byte) []byte
func (GetPlayerCommand) FromProto ¶ added in v0.14.0
func (c GetPlayerCommand) FromProto(p *pbsystem.GetPlayerCommand) GetPlayerCommand
func (GetPlayerCommand) MarshalWire ¶ added in v0.15.0
func (c GetPlayerCommand) MarshalWire() []byte
func (GetPlayerCommand) ProtoDescriptor ¶ added in v0.16.4
func (c GetPlayerCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (GetPlayerCommand) SizeWire ¶ added in v0.16.9
func (c GetPlayerCommand) SizeWire() int
func (GetPlayerCommand) ToProto ¶ added in v0.14.0
func (c GetPlayerCommand) ToProto() *pbsystem.GetPlayerCommand
func (GetPlayerCommand) UnmarshalWire ¶ added in v0.15.0
func (c GetPlayerCommand) UnmarshalWire(data []byte) (any, error)
type GetPlayerResult ¶
type GetPlayerResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
Player component.PlayerComponent `json:"player"`
}
GetPlayerResult is sent back to the client after GetPlayerCommand.
func (GetPlayerResult) AppendWire ¶ added in v0.16.9
func (c GetPlayerResult) AppendWire(b []byte) []byte
func (GetPlayerResult) FromProto ¶ added in v0.15.0
func (c GetPlayerResult) FromProto(p *pbsystem.GetPlayerResult) GetPlayerResult
func (GetPlayerResult) MarshalWire ¶ added in v0.15.0
func (c GetPlayerResult) MarshalWire() []byte
func (GetPlayerResult) Name ¶
func (r GetPlayerResult) Name() string
Name returns the request-prefixed event name.
func (GetPlayerResult) ProtoDescriptor ¶ added in v0.16.4
func (c GetPlayerResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (GetPlayerResult) SizeWire ¶ added in v0.16.9
func (c GetPlayerResult) SizeWire() int
func (GetPlayerResult) ToProto ¶ added in v0.15.0
func (c GetPlayerResult) ToProto() *pbsystem.GetPlayerResult
func (GetPlayerResult) UnmarshalWire ¶ added in v0.15.0
func (c GetPlayerResult) UnmarshalWire(data []byte) (any, error)
type HeartbeatCommand ¶
type HeartbeatCommand struct {
}
HeartbeatCommand is sent periodically by clients to indicate they're still connected. Players who don't send heartbeats within the timeout period are automatically removed.
func (HeartbeatCommand) AppendWire ¶ added in v0.16.9
func (c HeartbeatCommand) AppendWire(b []byte) []byte
func (HeartbeatCommand) FromProto ¶ added in v0.14.0
func (c HeartbeatCommand) FromProto(p *pbsystem.HeartbeatCommand) HeartbeatCommand
func (HeartbeatCommand) MarshalWire ¶ added in v0.15.0
func (c HeartbeatCommand) MarshalWire() []byte
func (HeartbeatCommand) ProtoDescriptor ¶ added in v0.16.4
func (c HeartbeatCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (HeartbeatCommand) SizeWire ¶ added in v0.16.9
func (c HeartbeatCommand) SizeWire() int
func (HeartbeatCommand) ToProto ¶ added in v0.14.0
func (c HeartbeatCommand) ToProto() *pbsystem.HeartbeatCommand
func (HeartbeatCommand) UnmarshalWire ¶ added in v0.15.0
func (c HeartbeatCommand) UnmarshalWire(data []byte) (any, error)
type HeartbeatSystem ¶
type HeartbeatSystem struct {
// contains filtered or unexported fields
}
HeartbeatSystem tracks player liveness each tick using the plugin's runtime.
func NewHeartbeatSystem ¶ added in v0.17.0
func NewHeartbeatSystem(runtime *Runtime) *HeartbeatSystem
NewHeartbeatSystem creates a system using the plugin's runtime.
func (*HeartbeatSystem) Run ¶ added in v0.17.0
func (s *HeartbeatSystem) Run(w *cardinal.World)
HeartbeatSystem processes heartbeat commands and removes stale players.
type InitSystem ¶
type InitSystem struct {
// contains filtered or unexported fields
}
InitSystem invalidates derived lobby lookups when the world initializes.
func NewInitSystem ¶ added in v0.17.0
func NewInitSystem(runtime *Runtime) *InitSystem
NewInitSystem creates a system using the plugin's runtime.
func (*InitSystem) Run ¶ added in v0.17.0
func (s *InitSystem) Run(_ *cardinal.World)
InitSystem invalidates the lookup index. Runs on boot and again inside World.reset().
It does not build the index, because Init runs before restore and restore replaces the world wholesale — an index built here would describe the pre-restore world. The rebuild happens on the first tick instead, which is the earliest point the world is final. See Runtime.rebuildIndex.
type InviteCodeGeneratedEvent ¶
type InviteCodeGeneratedEvent struct {
LobbyID string `json:"lobby_id"`
InviteCode string `json:"invite_code"`
}
InviteCodeGeneratedEvent is emitted when a new invite code is generated.
func (InviteCodeGeneratedEvent) AppendWire ¶ added in v0.16.9
func (c InviteCodeGeneratedEvent) AppendWire(b []byte) []byte
func (InviteCodeGeneratedEvent) FromProto ¶ added in v0.15.0
func (c InviteCodeGeneratedEvent) FromProto(p *pbsystem.InviteCodeGeneratedEvent) InviteCodeGeneratedEvent
func (InviteCodeGeneratedEvent) MarshalWire ¶ added in v0.15.0
func (c InviteCodeGeneratedEvent) MarshalWire() []byte
func (InviteCodeGeneratedEvent) Name ¶
func (InviteCodeGeneratedEvent) Name() string
Name returns the event name.
func (InviteCodeGeneratedEvent) ProtoDescriptor ¶ added in v0.16.4
func (c InviteCodeGeneratedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (InviteCodeGeneratedEvent) SizeWire ¶ added in v0.16.9
func (c InviteCodeGeneratedEvent) SizeWire() int
func (InviteCodeGeneratedEvent) ToProto ¶ added in v0.15.0
func (c InviteCodeGeneratedEvent) ToProto() *pbsystem.InviteCodeGeneratedEvent
func (InviteCodeGeneratedEvent) UnmarshalWire ¶ added in v0.15.0
func (c InviteCodeGeneratedEvent) UnmarshalWire(data []byte) (any, error)
type JoinLobbyCommand ¶
type JoinLobbyCommand struct {
RequestID string `json:"request_id"` // For matching request/response
InviteCode string `json:"invite_code"` // Required: invite code to join
TeamID string `json:"team_id,omitempty"` // Optional: team to join by ID (joins first available if empty)
// PlayerPassthroughData is opaque client JSON for the joining player, relayed to other clients.
PlayerPassthroughData string `json:"player_passthrough_data,omitempty"`
}
JoinLobbyCommand joins an existing lobby via invite code.
func (JoinLobbyCommand) AppendWire ¶ added in v0.16.9
func (c JoinLobbyCommand) AppendWire(b []byte) []byte
func (JoinLobbyCommand) FromProto ¶ added in v0.14.0
func (c JoinLobbyCommand) FromProto(p *pbsystem.JoinLobbyCommand) JoinLobbyCommand
func (JoinLobbyCommand) MarshalWire ¶ added in v0.15.0
func (c JoinLobbyCommand) MarshalWire() []byte
func (JoinLobbyCommand) ProtoDescriptor ¶ added in v0.16.4
func (c JoinLobbyCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (JoinLobbyCommand) SizeWire ¶ added in v0.16.9
func (c JoinLobbyCommand) SizeWire() int
func (JoinLobbyCommand) ToProto ¶ added in v0.14.0
func (c JoinLobbyCommand) ToProto() *pbsystem.JoinLobbyCommand
func (JoinLobbyCommand) UnmarshalWire ¶ added in v0.15.0
func (c JoinLobbyCommand) UnmarshalWire(data []byte) (any, error)
type JoinLobbyResult ¶
type JoinLobbyResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
Lobby component.LobbyComponent `json:"lobby"`
PlayersList [component.MaxLobbyPlayers]component.PlayerComponent `json:"players_list,omitempty"`
PlayersListCount int `json:"players_list_count"`
}
JoinLobbyResult is sent back to the client after JoinLobbyCommand.
func (JoinLobbyResult) AppendWire ¶ added in v0.16.9
func (c JoinLobbyResult) AppendWire(b []byte) []byte
func (JoinLobbyResult) FromProto ¶ added in v0.15.0
func (c JoinLobbyResult) FromProto(p *pbsystem.JoinLobbyResult) JoinLobbyResult
func (JoinLobbyResult) MarshalWire ¶ added in v0.15.0
func (c JoinLobbyResult) MarshalWire() []byte
func (JoinLobbyResult) Name ¶
func (r JoinLobbyResult) Name() string
Name returns the request-prefixed event name.
func (JoinLobbyResult) ProtoDescriptor ¶ added in v0.16.4
func (c JoinLobbyResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (JoinLobbyResult) SizeWire ¶ added in v0.16.9
func (c JoinLobbyResult) SizeWire() int
func (JoinLobbyResult) ToProto ¶ added in v0.15.0
func (c JoinLobbyResult) ToProto() *pbsystem.JoinLobbyResult
func (JoinLobbyResult) UnmarshalWire ¶ added in v0.15.0
func (c JoinLobbyResult) UnmarshalWire(data []byte) (any, error)
type JoinTeamCommand ¶
type JoinTeamCommand struct {
RequestID string `json:"request_id"` // For matching request/response
TeamID string `json:"team_id"`
}
JoinTeamCommand moves a player to a different team.
func (JoinTeamCommand) AppendWire ¶ added in v0.16.9
func (c JoinTeamCommand) AppendWire(b []byte) []byte
func (JoinTeamCommand) FromProto ¶ added in v0.14.0
func (c JoinTeamCommand) FromProto(p *pbsystem.JoinTeamCommand) JoinTeamCommand
func (JoinTeamCommand) MarshalWire ¶ added in v0.15.0
func (c JoinTeamCommand) MarshalWire() []byte
func (JoinTeamCommand) ProtoDescriptor ¶ added in v0.16.4
func (c JoinTeamCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (JoinTeamCommand) SizeWire ¶ added in v0.16.9
func (c JoinTeamCommand) SizeWire() int
func (JoinTeamCommand) ToProto ¶ added in v0.14.0
func (c JoinTeamCommand) ToProto() *pbsystem.JoinTeamCommand
func (JoinTeamCommand) UnmarshalWire ¶ added in v0.15.0
func (c JoinTeamCommand) UnmarshalWire(data []byte) (any, error)
type JoinTeamResult ¶
type JoinTeamResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
Player component.PlayerComponent `json:"player"`
}
JoinTeamResult is sent back to the client after JoinTeamCommand.
func (JoinTeamResult) AppendWire ¶ added in v0.16.9
func (c JoinTeamResult) AppendWire(b []byte) []byte
func (JoinTeamResult) FromProto ¶ added in v0.15.0
func (c JoinTeamResult) FromProto(p *pbsystem.JoinTeamResult) JoinTeamResult
func (JoinTeamResult) MarshalWire ¶ added in v0.15.0
func (c JoinTeamResult) MarshalWire() []byte
func (JoinTeamResult) Name ¶
func (r JoinTeamResult) Name() string
Name returns the request-prefixed event name.
func (JoinTeamResult) ProtoDescriptor ¶ added in v0.16.4
func (c JoinTeamResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (JoinTeamResult) SizeWire ¶ added in v0.16.9
func (c JoinTeamResult) SizeWire() int
func (JoinTeamResult) ToProto ¶ added in v0.15.0
func (c JoinTeamResult) ToProto() *pbsystem.JoinTeamResult
func (JoinTeamResult) UnmarshalWire ¶ added in v0.15.0
func (c JoinTeamResult) UnmarshalWire(data []byte) (any, error)
type KickPlayerCommand ¶
type KickPlayerCommand struct {
RequestID string `json:"request_id"` // For matching request/response
TargetPlayerID string `json:"target_player_id"`
}
KickPlayerCommand kicks a player from the lobby (leader only).
func (KickPlayerCommand) AppendWire ¶ added in v0.16.9
func (c KickPlayerCommand) AppendWire(b []byte) []byte
func (KickPlayerCommand) FromProto ¶ added in v0.14.0
func (c KickPlayerCommand) FromProto(p *pbsystem.KickPlayerCommand) KickPlayerCommand
func (KickPlayerCommand) MarshalWire ¶ added in v0.15.0
func (c KickPlayerCommand) MarshalWire() []byte
func (KickPlayerCommand) Name ¶
func (KickPlayerCommand) Name() string
Name returns the command name.
func (KickPlayerCommand) ProtoDescriptor ¶ added in v0.16.4
func (c KickPlayerCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (KickPlayerCommand) SizeWire ¶ added in v0.16.9
func (c KickPlayerCommand) SizeWire() int
func (KickPlayerCommand) ToProto ¶ added in v0.14.0
func (c KickPlayerCommand) ToProto() *pbsystem.KickPlayerCommand
func (KickPlayerCommand) UnmarshalWire ¶ added in v0.15.0
func (c KickPlayerCommand) UnmarshalWire(data []byte) (any, error)
type KickPlayerResult ¶
type KickPlayerResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
}
KickPlayerResult is sent back to the client after KickPlayerCommand.
func (KickPlayerResult) AppendWire ¶ added in v0.16.9
func (c KickPlayerResult) AppendWire(b []byte) []byte
func (KickPlayerResult) FromProto ¶ added in v0.15.0
func (c KickPlayerResult) FromProto(p *pbsystem.KickPlayerResult) KickPlayerResult
func (KickPlayerResult) MarshalWire ¶ added in v0.15.0
func (c KickPlayerResult) MarshalWire() []byte
func (KickPlayerResult) Name ¶
func (r KickPlayerResult) Name() string
Name returns the request-prefixed event name.
func (KickPlayerResult) ProtoDescriptor ¶ added in v0.16.4
func (c KickPlayerResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (KickPlayerResult) SizeWire ¶ added in v0.16.9
func (c KickPlayerResult) SizeWire() int
func (KickPlayerResult) ToProto ¶ added in v0.15.0
func (c KickPlayerResult) ToProto() *pbsystem.KickPlayerResult
func (KickPlayerResult) UnmarshalWire ¶ added in v0.15.0
func (c KickPlayerResult) UnmarshalWire(data []byte) (any, error)
type LeaderChangedEvent ¶
type LeaderChangedEvent struct {
LobbyID string `json:"lobby_id"`
OldLeaderID string `json:"old_leader_id"`
NewLeaderID string `json:"new_leader_id"`
}
LeaderChangedEvent is emitted when leadership is transferred.
func (LeaderChangedEvent) AppendWire ¶ added in v0.16.9
func (c LeaderChangedEvent) AppendWire(b []byte) []byte
func (LeaderChangedEvent) FromProto ¶ added in v0.15.0
func (c LeaderChangedEvent) FromProto(p *pbsystem.LeaderChangedEvent) LeaderChangedEvent
func (LeaderChangedEvent) MarshalWire ¶ added in v0.15.0
func (c LeaderChangedEvent) MarshalWire() []byte
func (LeaderChangedEvent) Name ¶
func (LeaderChangedEvent) Name() string
Name returns the event name.
func (LeaderChangedEvent) ProtoDescriptor ¶ added in v0.16.4
func (c LeaderChangedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (LeaderChangedEvent) SizeWire ¶ added in v0.16.9
func (c LeaderChangedEvent) SizeWire() int
func (LeaderChangedEvent) ToProto ¶ added in v0.15.0
func (c LeaderChangedEvent) ToProto() *pbsystem.LeaderChangedEvent
func (LeaderChangedEvent) UnmarshalWire ¶ added in v0.15.0
func (c LeaderChangedEvent) UnmarshalWire(data []byte) (any, error)
type LeaveLobbyCommand ¶
type LeaveLobbyCommand struct {
RequestID string `json:"request_id"` // For matching request/response
}
LeaveLobbyCommand leaves the current lobby.
func (LeaveLobbyCommand) AppendWire ¶ added in v0.16.9
func (c LeaveLobbyCommand) AppendWire(b []byte) []byte
func (LeaveLobbyCommand) FromProto ¶ added in v0.14.0
func (c LeaveLobbyCommand) FromProto(p *pbsystem.LeaveLobbyCommand) LeaveLobbyCommand
func (LeaveLobbyCommand) MarshalWire ¶ added in v0.15.0
func (c LeaveLobbyCommand) MarshalWire() []byte
func (LeaveLobbyCommand) Name ¶
func (LeaveLobbyCommand) Name() string
Name returns the command name.
func (LeaveLobbyCommand) ProtoDescriptor ¶ added in v0.16.4
func (c LeaveLobbyCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (LeaveLobbyCommand) SizeWire ¶ added in v0.16.9
func (c LeaveLobbyCommand) SizeWire() int
func (LeaveLobbyCommand) ToProto ¶ added in v0.14.0
func (c LeaveLobbyCommand) ToProto() *pbsystem.LeaveLobbyCommand
func (LeaveLobbyCommand) UnmarshalWire ¶ added in v0.15.0
func (c LeaveLobbyCommand) UnmarshalWire(data []byte) (any, error)
type LeaveLobbyResult ¶
type LeaveLobbyResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
}
LeaveLobbyResult is sent back to the client after LeaveLobbyCommand.
func (LeaveLobbyResult) AppendWire ¶ added in v0.16.9
func (c LeaveLobbyResult) AppendWire(b []byte) []byte
func (LeaveLobbyResult) FromProto ¶ added in v0.15.0
func (c LeaveLobbyResult) FromProto(p *pbsystem.LeaveLobbyResult) LeaveLobbyResult
func (LeaveLobbyResult) MarshalWire ¶ added in v0.15.0
func (c LeaveLobbyResult) MarshalWire() []byte
func (LeaveLobbyResult) Name ¶
func (r LeaveLobbyResult) Name() string
Name returns the request-prefixed event name.
func (LeaveLobbyResult) ProtoDescriptor ¶ added in v0.16.4
func (c LeaveLobbyResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (LeaveLobbyResult) SizeWire ¶ added in v0.16.9
func (c LeaveLobbyResult) SizeWire() int
func (LeaveLobbyResult) ToProto ¶ added in v0.15.0
func (c LeaveLobbyResult) ToProto() *pbsystem.LeaveLobbyResult
func (LeaveLobbyResult) UnmarshalWire ¶ added in v0.15.0
func (c LeaveLobbyResult) UnmarshalWire(data []byte) (any, error)
type LobbyCreatedEvent ¶
type LobbyCreatedEvent struct {
LobbyID string `json:"lobby_id"`
LeaderID string `json:"leader_id"`
InviteCode string `json:"invite_code"`
}
LobbyCreatedEvent is emitted when a lobby is created.
func (LobbyCreatedEvent) AppendWire ¶ added in v0.16.9
func (c LobbyCreatedEvent) AppendWire(b []byte) []byte
func (LobbyCreatedEvent) FromProto ¶ added in v0.15.0
func (c LobbyCreatedEvent) FromProto(p *pbsystem.LobbyCreatedEvent) LobbyCreatedEvent
func (LobbyCreatedEvent) MarshalWire ¶ added in v0.15.0
func (c LobbyCreatedEvent) MarshalWire() []byte
func (LobbyCreatedEvent) ProtoDescriptor ¶ added in v0.16.4
func (c LobbyCreatedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (LobbyCreatedEvent) SizeWire ¶ added in v0.16.9
func (c LobbyCreatedEvent) SizeWire() int
func (LobbyCreatedEvent) ToProto ¶ added in v0.15.0
func (c LobbyCreatedEvent) ToProto() *pbsystem.LobbyCreatedEvent
func (LobbyCreatedEvent) UnmarshalWire ¶ added in v0.15.0
func (c LobbyCreatedEvent) UnmarshalWire(data []byte) (any, error)
type LobbyDeletedEvent ¶
type LobbyDeletedEvent struct {
LobbyID string `json:"lobby_id"`
}
LobbyDeletedEvent is emitted when a lobby is deleted.
func (LobbyDeletedEvent) AppendWire ¶ added in v0.16.9
func (c LobbyDeletedEvent) AppendWire(b []byte) []byte
func (LobbyDeletedEvent) FromProto ¶ added in v0.15.0
func (c LobbyDeletedEvent) FromProto(p *pbsystem.LobbyDeletedEvent) LobbyDeletedEvent
func (LobbyDeletedEvent) MarshalWire ¶ added in v0.15.0
func (c LobbyDeletedEvent) MarshalWire() []byte
func (LobbyDeletedEvent) ProtoDescriptor ¶ added in v0.16.4
func (c LobbyDeletedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (LobbyDeletedEvent) SizeWire ¶ added in v0.16.9
func (c LobbyDeletedEvent) SizeWire() int
func (LobbyDeletedEvent) ToProto ¶ added in v0.15.0
func (c LobbyDeletedEvent) ToProto() *pbsystem.LobbyDeletedEvent
func (LobbyDeletedEvent) UnmarshalWire ¶ added in v0.15.0
func (c LobbyDeletedEvent) UnmarshalWire(data []byte) (any, error)
type LobbyProvider ¶
type LobbyProvider interface {
// GenerateInviteCode generates a custom invite code for the lobby.
//
// seed is the only source of variation between calls for the same lobby, and
// the caller must vary it per attempt: generateInviteCodeWithRetry retries on
// collision and depends on each attempt yielding a different code.
// Implementations should be pure in (lobby, seed).
GenerateInviteCode(lobby *component.LobbyComponent, seed int64) string
// ValidateJoin runs game-specific guards on a JoinLobbyCommand after
// the generic guards (already-in-lobby, invalid code, in-session)
// pass and before team selection. Return ok=false with a non-empty
// reason to reject the join; the plugin emits a JoinLobbyResult
// failure carrying that reason. Return ok=true to allow.
ValidateJoin(lobby *component.LobbyComponent, cmd JoinLobbyCommand) (ok bool, reason string)
}
LobbyProvider defines customizable behavior for the lobby system.
type LobbySystem ¶
type LobbySystem struct {
// contains filtered or unexported fields
}
LobbySystem processes lobby commands each tick using the plugin's runtime. The commands it reads and the events it emits are registered by the plugin; see lobby.Plugin.Register.
func NewLobbySystem ¶ added in v0.17.0
func NewLobbySystem(runtime *Runtime) *LobbySystem
NewLobbySystem creates a system using the plugin's runtime.
func (*LobbySystem) Run ¶ added in v0.17.0
func (s *LobbySystem) Run(w *cardinal.World)
LobbySystem processes lobby commands.
type NotifySessionEndCommand ¶
type NotifySessionEndCommand struct {
LobbyID string `json:"lobby_id"`
}
NotifySessionEndCommand is sent from game shard to lobby when session ends.
func (NotifySessionEndCommand) AppendWire ¶ added in v0.16.9
func (c NotifySessionEndCommand) AppendWire(b []byte) []byte
func (NotifySessionEndCommand) FromProto ¶ added in v0.14.0
func (c NotifySessionEndCommand) FromProto(p *pbsystem.NotifySessionEndCommand) NotifySessionEndCommand
func (NotifySessionEndCommand) MarshalWire ¶ added in v0.15.0
func (c NotifySessionEndCommand) MarshalWire() []byte
func (NotifySessionEndCommand) Name ¶
func (NotifySessionEndCommand) Name() string
Name returns the command name.
func (NotifySessionEndCommand) ProtoDescriptor ¶ added in v0.16.4
func (c NotifySessionEndCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (NotifySessionEndCommand) SizeWire ¶ added in v0.16.9
func (c NotifySessionEndCommand) SizeWire() int
func (NotifySessionEndCommand) ToProto ¶ added in v0.14.0
func (c NotifySessionEndCommand) ToProto() *pbsystem.NotifySessionEndCommand
func (NotifySessionEndCommand) UnmarshalWire ¶ added in v0.15.0
func (c NotifySessionEndCommand) UnmarshalWire(data []byte) (any, error)
type NotifySessionStartCommand ¶
type NotifySessionStartCommand struct {
LobbyID string `json:"lobby_id"`
LobbyWorld component.ShardAddress `json:"lobby_world"`
}
NotifySessionStartCommand is sent to game shard when a session starts. NotifySessionStartCommand tells the game shard a session is starting. It's a wire DTO: it carries only what the receiver needs (the lobby id and this lobby shard's address to reply to), not the live LobbyComponent/PlayerComponent — those are domain types and never go on the wire.
func (NotifySessionStartCommand) AppendWire ¶ added in v0.16.9
func (c NotifySessionStartCommand) AppendWire(b []byte) []byte
func (NotifySessionStartCommand) FromProto ¶ added in v0.14.0
func (c NotifySessionStartCommand) FromProto(p *pbsystem.NotifySessionStartCommand) NotifySessionStartCommand
func (NotifySessionStartCommand) MarshalWire ¶ added in v0.15.0
func (c NotifySessionStartCommand) MarshalWire() []byte
func (NotifySessionStartCommand) Name ¶
func (NotifySessionStartCommand) Name() string
Name returns the command name.
func (NotifySessionStartCommand) ProtoDescriptor ¶ added in v0.16.4
func (c NotifySessionStartCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (NotifySessionStartCommand) SizeWire ¶ added in v0.16.9
func (c NotifySessionStartCommand) SizeWire() int
func (NotifySessionStartCommand) ToProto ¶ added in v0.14.0
func (c NotifySessionStartCommand) ToProto() *pbsystem.NotifySessionStartCommand
func (NotifySessionStartCommand) UnmarshalWire ¶ added in v0.15.0
func (c NotifySessionStartCommand) UnmarshalWire(data []byte) (any, error)
type PlayerChangedTeamEvent ¶
type PlayerChangedTeamEvent struct {
LobbyID string `json:"lobby_id"`
OldTeamID string `json:"old_team_id"`
NewTeamID string `json:"new_team_id"`
Player component.PlayerComponent `json:"player"`
}
PlayerChangedTeamEvent is emitted when a player changes team.
func (PlayerChangedTeamEvent) AppendWire ¶ added in v0.16.9
func (c PlayerChangedTeamEvent) AppendWire(b []byte) []byte
func (PlayerChangedTeamEvent) FromProto ¶ added in v0.15.0
func (c PlayerChangedTeamEvent) FromProto(p *pbsystem.PlayerChangedTeamEvent) PlayerChangedTeamEvent
func (PlayerChangedTeamEvent) MarshalWire ¶ added in v0.15.0
func (c PlayerChangedTeamEvent) MarshalWire() []byte
func (PlayerChangedTeamEvent) Name ¶
func (PlayerChangedTeamEvent) Name() string
Name returns the event name.
func (PlayerChangedTeamEvent) ProtoDescriptor ¶ added in v0.16.4
func (c PlayerChangedTeamEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (PlayerChangedTeamEvent) SizeWire ¶ added in v0.16.9
func (c PlayerChangedTeamEvent) SizeWire() int
func (PlayerChangedTeamEvent) ToProto ¶ added in v0.15.0
func (c PlayerChangedTeamEvent) ToProto() *pbsystem.PlayerChangedTeamEvent
func (PlayerChangedTeamEvent) UnmarshalWire ¶ added in v0.15.0
func (c PlayerChangedTeamEvent) UnmarshalWire(data []byte) (any, error)
type PlayerJoinedEvent ¶
type PlayerJoinedEvent struct {
LobbyID string `json:"lobby_id"`
TeamID string `json:"team_id"`
Player component.PlayerComponent `json:"player"`
}
PlayerJoinedEvent is emitted when a player joins a lobby.
func (PlayerJoinedEvent) AppendWire ¶ added in v0.16.9
func (c PlayerJoinedEvent) AppendWire(b []byte) []byte
func (PlayerJoinedEvent) FromProto ¶ added in v0.15.0
func (c PlayerJoinedEvent) FromProto(p *pbsystem.PlayerJoinedEvent) PlayerJoinedEvent
func (PlayerJoinedEvent) MarshalWire ¶ added in v0.15.0
func (c PlayerJoinedEvent) MarshalWire() []byte
func (PlayerJoinedEvent) ProtoDescriptor ¶ added in v0.16.4
func (c PlayerJoinedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (PlayerJoinedEvent) SizeWire ¶ added in v0.16.9
func (c PlayerJoinedEvent) SizeWire() int
func (PlayerJoinedEvent) ToProto ¶ added in v0.15.0
func (c PlayerJoinedEvent) ToProto() *pbsystem.PlayerJoinedEvent
func (PlayerJoinedEvent) UnmarshalWire ¶ added in v0.15.0
func (c PlayerJoinedEvent) UnmarshalWire(data []byte) (any, error)
type PlayerKickedEvent ¶
type PlayerKickedEvent struct {
LobbyID string `json:"lobby_id"`
PlayerID string `json:"player_id"`
KickerID string `json:"kicker_id"`
}
PlayerKickedEvent is emitted when a player is kicked.
func (PlayerKickedEvent) AppendWire ¶ added in v0.16.9
func (c PlayerKickedEvent) AppendWire(b []byte) []byte
func (PlayerKickedEvent) FromProto ¶ added in v0.15.0
func (c PlayerKickedEvent) FromProto(p *pbsystem.PlayerKickedEvent) PlayerKickedEvent
func (PlayerKickedEvent) MarshalWire ¶ added in v0.15.0
func (c PlayerKickedEvent) MarshalWire() []byte
func (PlayerKickedEvent) ProtoDescriptor ¶ added in v0.16.4
func (c PlayerKickedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (PlayerKickedEvent) SizeWire ¶ added in v0.16.9
func (c PlayerKickedEvent) SizeWire() int
func (PlayerKickedEvent) ToProto ¶ added in v0.15.0
func (c PlayerKickedEvent) ToProto() *pbsystem.PlayerKickedEvent
func (PlayerKickedEvent) UnmarshalWire ¶ added in v0.15.0
func (c PlayerKickedEvent) UnmarshalWire(data []byte) (any, error)
type PlayerLeftEvent ¶
PlayerLeftEvent is emitted when a player leaves a lobby.
func (PlayerLeftEvent) AppendWire ¶ added in v0.16.9
func (c PlayerLeftEvent) AppendWire(b []byte) []byte
func (PlayerLeftEvent) FromProto ¶ added in v0.15.0
func (c PlayerLeftEvent) FromProto(p *pbsystem.PlayerLeftEvent) PlayerLeftEvent
func (PlayerLeftEvent) MarshalWire ¶ added in v0.15.0
func (c PlayerLeftEvent) MarshalWire() []byte
func (PlayerLeftEvent) ProtoDescriptor ¶ added in v0.16.4
func (c PlayerLeftEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (PlayerLeftEvent) SizeWire ¶ added in v0.16.9
func (c PlayerLeftEvent) SizeWire() int
func (PlayerLeftEvent) ToProto ¶ added in v0.15.0
func (c PlayerLeftEvent) ToProto() *pbsystem.PlayerLeftEvent
func (PlayerLeftEvent) UnmarshalWire ¶ added in v0.15.0
func (c PlayerLeftEvent) UnmarshalWire(data []byte) (any, error)
type PlayerPassthroughUpdatedEvent ¶
type PlayerPassthroughUpdatedEvent struct {
LobbyID string `json:"lobby_id"`
Player component.PlayerComponent `json:"player"`
}
PlayerPassthroughUpdatedEvent is emitted when a player's passthrough data is updated.
func (PlayerPassthroughUpdatedEvent) AppendWire ¶ added in v0.16.9
func (c PlayerPassthroughUpdatedEvent) AppendWire(b []byte) []byte
func (PlayerPassthroughUpdatedEvent) FromProto ¶ added in v0.15.0
func (c PlayerPassthroughUpdatedEvent) FromProto(p *pbsystem.PlayerPassthroughUpdatedEvent) PlayerPassthroughUpdatedEvent
func (PlayerPassthroughUpdatedEvent) MarshalWire ¶ added in v0.15.0
func (c PlayerPassthroughUpdatedEvent) MarshalWire() []byte
func (PlayerPassthroughUpdatedEvent) Name ¶
func (PlayerPassthroughUpdatedEvent) Name() string
Name returns the event name.
func (PlayerPassthroughUpdatedEvent) ProtoDescriptor ¶ added in v0.16.4
func (c PlayerPassthroughUpdatedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (PlayerPassthroughUpdatedEvent) SizeWire ¶ added in v0.16.9
func (c PlayerPassthroughUpdatedEvent) SizeWire() int
func (PlayerPassthroughUpdatedEvent) ToProto ¶ added in v0.15.0
func (c PlayerPassthroughUpdatedEvent) ToProto() *pbsystem.PlayerPassthroughUpdatedEvent
func (PlayerPassthroughUpdatedEvent) UnmarshalWire ¶ added in v0.15.0
func (c PlayerPassthroughUpdatedEvent) UnmarshalWire(data []byte) (any, error)
type PlayerReadyEvent ¶
type PlayerReadyEvent struct {
LobbyID string `json:"lobby_id"`
Player component.PlayerComponent `json:"player"`
}
PlayerReadyEvent is emitted when a player changes ready status.
func (PlayerReadyEvent) AppendWire ¶ added in v0.16.9
func (c PlayerReadyEvent) AppendWire(b []byte) []byte
func (PlayerReadyEvent) FromProto ¶ added in v0.15.0
func (c PlayerReadyEvent) FromProto(p *pbsystem.PlayerReadyEvent) PlayerReadyEvent
func (PlayerReadyEvent) MarshalWire ¶ added in v0.15.0
func (c PlayerReadyEvent) MarshalWire() []byte
func (PlayerReadyEvent) ProtoDescriptor ¶ added in v0.16.4
func (c PlayerReadyEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (PlayerReadyEvent) SizeWire ¶ added in v0.16.9
func (c PlayerReadyEvent) SizeWire() int
func (PlayerReadyEvent) ToProto ¶ added in v0.15.0
func (c PlayerReadyEvent) ToProto() *pbsystem.PlayerReadyEvent
func (PlayerReadyEvent) UnmarshalWire ¶ added in v0.15.0
func (c PlayerReadyEvent) UnmarshalWire(data []byte) (any, error)
type PlayerTimedOutEvent ¶
type PlayerTimedOutEvent struct {
LobbyID string `json:"lobby_id"`
PlayerID string `json:"player_id"`
}
PlayerTimedOutEvent is emitted when a player is removed due to missed heartbeats.
func (PlayerTimedOutEvent) AppendWire ¶ added in v0.16.9
func (c PlayerTimedOutEvent) AppendWire(b []byte) []byte
func (PlayerTimedOutEvent) FromProto ¶ added in v0.15.0
func (c PlayerTimedOutEvent) FromProto(p *pbsystem.PlayerTimedOutEvent) PlayerTimedOutEvent
func (PlayerTimedOutEvent) MarshalWire ¶ added in v0.15.0
func (c PlayerTimedOutEvent) MarshalWire() []byte
func (PlayerTimedOutEvent) Name ¶
func (PlayerTimedOutEvent) Name() string
Name returns the event name.
func (PlayerTimedOutEvent) ProtoDescriptor ¶ added in v0.16.4
func (c PlayerTimedOutEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (PlayerTimedOutEvent) SizeWire ¶ added in v0.16.9
func (c PlayerTimedOutEvent) SizeWire() int
func (PlayerTimedOutEvent) ToProto ¶ added in v0.15.0
func (c PlayerTimedOutEvent) ToProto() *pbsystem.PlayerTimedOutEvent
func (PlayerTimedOutEvent) UnmarshalWire ¶ added in v0.15.0
func (c PlayerTimedOutEvent) UnmarshalWire(data []byte) (any, error)
type Runtime ¶ added in v0.17.0
type Runtime struct {
// contains filtered or unexported fields
}
Runtime owns one world's deployment configuration and derived lobby lookups. Configuration stays outside ECS so restored snapshots use the running deployment's settings. Each plugin instance creates its own runtime and shares it only among its systems.
func NewRuntime ¶ added in v0.17.0
func NewRuntime(config Config, provider LobbyProvider, presets map[string][]component.TeamConfig) *Runtime
NewRuntime validates and copies the server-owned configuration. Invalid presets panic at registration rather than rejecting every lobby creation at runtime.
type SessionAwaitingAllocationEvent ¶
type SessionAwaitingAllocationEvent struct {
LobbyID string `json:"lobby_id"`
}
SessionAwaitingAllocationEvent is emitted when a session is awaiting shard assignment. External orchestrators listen for this event and respond with an AssignShardCommand to complete the session start.
func (SessionAwaitingAllocationEvent) AppendWire ¶ added in v0.16.9
func (c SessionAwaitingAllocationEvent) AppendWire(b []byte) []byte
func (SessionAwaitingAllocationEvent) FromProto ¶ added in v0.15.0
func (c SessionAwaitingAllocationEvent) FromProto(p *pbsystem.SessionAwaitingAllocationEvent) SessionAwaitingAllocationEvent
func (SessionAwaitingAllocationEvent) MarshalWire ¶ added in v0.15.0
func (c SessionAwaitingAllocationEvent) MarshalWire() []byte
func (SessionAwaitingAllocationEvent) Name ¶
func (SessionAwaitingAllocationEvent) Name() string
Name returns the event name.
func (SessionAwaitingAllocationEvent) ProtoDescriptor ¶ added in v0.16.4
func (c SessionAwaitingAllocationEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (SessionAwaitingAllocationEvent) SizeWire ¶ added in v0.16.9
func (c SessionAwaitingAllocationEvent) SizeWire() int
func (SessionAwaitingAllocationEvent) ToProto ¶ added in v0.15.0
func (c SessionAwaitingAllocationEvent) ToProto() *pbsystem.SessionAwaitingAllocationEvent
func (SessionAwaitingAllocationEvent) UnmarshalWire ¶ added in v0.15.0
func (c SessionAwaitingAllocationEvent) UnmarshalWire(data []byte) (any, error)
type SessionEndedEvent ¶
type SessionEndedEvent struct {
LobbyID string `json:"lobby_id"`
}
SessionEndedEvent is emitted when a session ends.
func (SessionEndedEvent) AppendWire ¶ added in v0.16.9
func (c SessionEndedEvent) AppendWire(b []byte) []byte
func (SessionEndedEvent) FromProto ¶ added in v0.15.0
func (c SessionEndedEvent) FromProto(p *pbsystem.SessionEndedEvent) SessionEndedEvent
func (SessionEndedEvent) MarshalWire ¶ added in v0.15.0
func (c SessionEndedEvent) MarshalWire() []byte
func (SessionEndedEvent) ProtoDescriptor ¶ added in v0.16.4
func (c SessionEndedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (SessionEndedEvent) SizeWire ¶ added in v0.16.9
func (c SessionEndedEvent) SizeWire() int
func (SessionEndedEvent) ToProto ¶ added in v0.15.0
func (c SessionEndedEvent) ToProto() *pbsystem.SessionEndedEvent
func (SessionEndedEvent) UnmarshalWire ¶ added in v0.15.0
func (c SessionEndedEvent) UnmarshalWire(data []byte) (any, error)
type SessionPassthroughUpdatedEvent ¶
type SessionPassthroughUpdatedEvent struct {
LobbyID string `json:"lobby_id"`
PassthroughData string `json:"passthrough_data"`
}
SessionPassthroughUpdatedEvent is emitted when session passthrough data is updated.
func (SessionPassthroughUpdatedEvent) AppendWire ¶ added in v0.16.9
func (c SessionPassthroughUpdatedEvent) AppendWire(b []byte) []byte
func (SessionPassthroughUpdatedEvent) FromProto ¶ added in v0.15.0
func (c SessionPassthroughUpdatedEvent) FromProto(p *pbsystem.SessionPassthroughUpdatedEvent) SessionPassthroughUpdatedEvent
func (SessionPassthroughUpdatedEvent) MarshalWire ¶ added in v0.15.0
func (c SessionPassthroughUpdatedEvent) MarshalWire() []byte
func (SessionPassthroughUpdatedEvent) Name ¶
func (SessionPassthroughUpdatedEvent) Name() string
Name returns the event name.
func (SessionPassthroughUpdatedEvent) ProtoDescriptor ¶ added in v0.16.4
func (c SessionPassthroughUpdatedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (SessionPassthroughUpdatedEvent) SizeWire ¶ added in v0.16.9
func (c SessionPassthroughUpdatedEvent) SizeWire() int
func (SessionPassthroughUpdatedEvent) ToProto ¶ added in v0.15.0
func (c SessionPassthroughUpdatedEvent) ToProto() *pbsystem.SessionPassthroughUpdatedEvent
func (SessionPassthroughUpdatedEvent) UnmarshalWire ¶ added in v0.15.0
func (c SessionPassthroughUpdatedEvent) UnmarshalWire(data []byte) (any, error)
type SessionStartedEvent ¶
type SessionStartedEvent struct {
LobbyID string `json:"lobby_id"`
GameWorld component.ShardAddress `json:"game_world"`
}
SessionStartedEvent is emitted when a session starts. Carries the assigned game shard address so every player in the lobby (not just the session starter) learns which gameplay shard to connect to without a follow-up query.
func (SessionStartedEvent) AppendWire ¶ added in v0.16.9
func (c SessionStartedEvent) AppendWire(b []byte) []byte
func (SessionStartedEvent) FromProto ¶ added in v0.15.0
func (c SessionStartedEvent) FromProto(p *pbsystem.SessionStartedEvent) SessionStartedEvent
func (SessionStartedEvent) MarshalWire ¶ added in v0.15.0
func (c SessionStartedEvent) MarshalWire() []byte
func (SessionStartedEvent) Name ¶
func (SessionStartedEvent) Name() string
Name returns the event name.
func (SessionStartedEvent) ProtoDescriptor ¶ added in v0.16.4
func (c SessionStartedEvent) ProtoDescriptor() protoreflect.MessageDescriptor
func (SessionStartedEvent) SizeWire ¶ added in v0.16.9
func (c SessionStartedEvent) SizeWire() int
func (SessionStartedEvent) ToProto ¶ added in v0.15.0
func (c SessionStartedEvent) ToProto() *pbsystem.SessionStartedEvent
func (SessionStartedEvent) UnmarshalWire ¶ added in v0.15.0
func (c SessionStartedEvent) UnmarshalWire(data []byte) (any, error)
type SetReadyCommand ¶
type SetReadyCommand struct {
RequestID string `json:"request_id"` // For matching request/response
IsReady bool `json:"is_ready"`
}
SetReadyCommand sets the player's ready status.
func (SetReadyCommand) AppendWire ¶ added in v0.16.9
func (c SetReadyCommand) AppendWire(b []byte) []byte
func (SetReadyCommand) FromProto ¶ added in v0.14.0
func (c SetReadyCommand) FromProto(p *pbsystem.SetReadyCommand) SetReadyCommand
func (SetReadyCommand) MarshalWire ¶ added in v0.15.0
func (c SetReadyCommand) MarshalWire() []byte
func (SetReadyCommand) ProtoDescriptor ¶ added in v0.16.4
func (c SetReadyCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (SetReadyCommand) SizeWire ¶ added in v0.16.9
func (c SetReadyCommand) SizeWire() int
func (SetReadyCommand) ToProto ¶ added in v0.14.0
func (c SetReadyCommand) ToProto() *pbsystem.SetReadyCommand
func (SetReadyCommand) UnmarshalWire ¶ added in v0.15.0
func (c SetReadyCommand) UnmarshalWire(data []byte) (any, error)
type SetReadyResult ¶
type SetReadyResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
Player component.PlayerComponent `json:"player"`
}
SetReadyResult is sent back to the client after SetReadyCommand.
func (SetReadyResult) AppendWire ¶ added in v0.16.9
func (c SetReadyResult) AppendWire(b []byte) []byte
func (SetReadyResult) FromProto ¶ added in v0.15.0
func (c SetReadyResult) FromProto(p *pbsystem.SetReadyResult) SetReadyResult
func (SetReadyResult) MarshalWire ¶ added in v0.15.0
func (c SetReadyResult) MarshalWire() []byte
func (SetReadyResult) Name ¶
func (r SetReadyResult) Name() string
Name returns the request-prefixed event name.
func (SetReadyResult) ProtoDescriptor ¶ added in v0.16.4
func (c SetReadyResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (SetReadyResult) SizeWire ¶ added in v0.16.9
func (c SetReadyResult) SizeWire() int
func (SetReadyResult) ToProto ¶ added in v0.15.0
func (c SetReadyResult) ToProto() *pbsystem.SetReadyResult
func (SetReadyResult) UnmarshalWire ¶ added in v0.15.0
func (c SetReadyResult) UnmarshalWire(data []byte) (any, error)
type StartSessionCommand ¶
type StartSessionCommand struct {
RequestID string `json:"request_id"` // For matching request/response
}
StartSessionCommand starts the session (leader only). The corresponding StartSessionResult is emitted asynchronously, typically several ticks after this command is accepted, once an orchestrator responds with AssignShardCommand. Clients must not set short timeouts on StartSessionResult.
func (StartSessionCommand) AppendWire ¶ added in v0.16.9
func (c StartSessionCommand) AppendWire(b []byte) []byte
func (StartSessionCommand) FromProto ¶ added in v0.14.0
func (c StartSessionCommand) FromProto(p *pbsystem.StartSessionCommand) StartSessionCommand
func (StartSessionCommand) MarshalWire ¶ added in v0.15.0
func (c StartSessionCommand) MarshalWire() []byte
func (StartSessionCommand) Name ¶
func (StartSessionCommand) Name() string
Name returns the command name.
func (StartSessionCommand) ProtoDescriptor ¶ added in v0.16.4
func (c StartSessionCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (StartSessionCommand) SizeWire ¶ added in v0.16.9
func (c StartSessionCommand) SizeWire() int
func (StartSessionCommand) ToProto ¶ added in v0.14.0
func (c StartSessionCommand) ToProto() *pbsystem.StartSessionCommand
func (StartSessionCommand) UnmarshalWire ¶ added in v0.15.0
func (c StartSessionCommand) UnmarshalWire(data []byte) (any, error)
type StartSessionPayload ¶
type StartSessionPayload = NotifySessionStartCommand
StartSessionPayload is an alias for NotifySessionStartCommand for documentation clarity.
type StartSessionResult ¶
type StartSessionResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
GameWorld component.ShardAddress `json:"game_world"`
}
StartSessionResult is sent back to the client after StartSessionCommand. Emitted asynchronously — may arrive several ticks after the command, once the orchestrator assigns a game shard via AssignShardCommand. On success, GameWorld holds the assigned shard address so the client can connect without an extra query. Zero-valued on failure.
func (StartSessionResult) AppendWire ¶ added in v0.16.9
func (c StartSessionResult) AppendWire(b []byte) []byte
func (StartSessionResult) FromProto ¶ added in v0.15.0
func (c StartSessionResult) FromProto(p *pbsystem.StartSessionResult) StartSessionResult
func (StartSessionResult) MarshalWire ¶ added in v0.15.0
func (c StartSessionResult) MarshalWire() []byte
func (StartSessionResult) Name ¶
func (r StartSessionResult) Name() string
Name returns the request-prefixed event name.
func (StartSessionResult) ProtoDescriptor ¶ added in v0.16.4
func (c StartSessionResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (StartSessionResult) SizeWire ¶ added in v0.16.9
func (c StartSessionResult) SizeWire() int
func (StartSessionResult) ToProto ¶ added in v0.15.0
func (c StartSessionResult) ToProto() *pbsystem.StartSessionResult
func (StartSessionResult) UnmarshalWire ¶ added in v0.15.0
func (c StartSessionResult) UnmarshalWire(data []byte) (any, error)
type TeamConfig ¶
type TeamConfig = component.TeamConfig
TeamConfig is an alias for component.TeamConfig to preserve the existing external type path (lobby.TeamConfig).
type TransferLeaderCommand ¶
type TransferLeaderCommand struct {
RequestID string `json:"request_id"` // For matching request/response
TargetPlayerID string `json:"target_player_id"`
}
TransferLeaderCommand transfers leadership to another player.
func (TransferLeaderCommand) AppendWire ¶ added in v0.16.9
func (c TransferLeaderCommand) AppendWire(b []byte) []byte
func (TransferLeaderCommand) FromProto ¶ added in v0.14.0
func (c TransferLeaderCommand) FromProto(p *pbsystem.TransferLeaderCommand) TransferLeaderCommand
func (TransferLeaderCommand) MarshalWire ¶ added in v0.15.0
func (c TransferLeaderCommand) MarshalWire() []byte
func (TransferLeaderCommand) Name ¶
func (TransferLeaderCommand) Name() string
Name returns the command name.
func (TransferLeaderCommand) ProtoDescriptor ¶ added in v0.16.4
func (c TransferLeaderCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (TransferLeaderCommand) SizeWire ¶ added in v0.16.9
func (c TransferLeaderCommand) SizeWire() int
func (TransferLeaderCommand) ToProto ¶ added in v0.14.0
func (c TransferLeaderCommand) ToProto() *pbsystem.TransferLeaderCommand
func (TransferLeaderCommand) UnmarshalWire ¶ added in v0.15.0
func (c TransferLeaderCommand) UnmarshalWire(data []byte) (any, error)
type TransferLeaderResult ¶
type TransferLeaderResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
}
TransferLeaderResult is sent back to the client after TransferLeaderCommand.
func (TransferLeaderResult) AppendWire ¶ added in v0.16.9
func (c TransferLeaderResult) AppendWire(b []byte) []byte
func (TransferLeaderResult) FromProto ¶ added in v0.15.0
func (c TransferLeaderResult) FromProto(p *pbsystem.TransferLeaderResult) TransferLeaderResult
func (TransferLeaderResult) MarshalWire ¶ added in v0.15.0
func (c TransferLeaderResult) MarshalWire() []byte
func (TransferLeaderResult) Name ¶
func (r TransferLeaderResult) Name() string
Name returns the request-prefixed event name.
func (TransferLeaderResult) ProtoDescriptor ¶ added in v0.16.4
func (c TransferLeaderResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (TransferLeaderResult) SizeWire ¶ added in v0.16.9
func (c TransferLeaderResult) SizeWire() int
func (TransferLeaderResult) ToProto ¶ added in v0.15.0
func (c TransferLeaderResult) ToProto() *pbsystem.TransferLeaderResult
func (TransferLeaderResult) UnmarshalWire ¶ added in v0.15.0
func (c TransferLeaderResult) UnmarshalWire(data []byte) (any, error)
type UpdatePlayerPassthroughCommand ¶
type UpdatePlayerPassthroughCommand struct {
RequestID string `json:"request_id"` // For matching request/response
PassthroughData string `json:"passthrough_data"`
}
UpdatePlayerPassthroughCommand updates the player's own passthrough data.
func (UpdatePlayerPassthroughCommand) AppendWire ¶ added in v0.16.9
func (c UpdatePlayerPassthroughCommand) AppendWire(b []byte) []byte
func (UpdatePlayerPassthroughCommand) FromProto ¶ added in v0.14.0
func (c UpdatePlayerPassthroughCommand) FromProto(p *pbsystem.UpdatePlayerPassthroughCommand) UpdatePlayerPassthroughCommand
func (UpdatePlayerPassthroughCommand) MarshalWire ¶ added in v0.15.0
func (c UpdatePlayerPassthroughCommand) MarshalWire() []byte
func (UpdatePlayerPassthroughCommand) Name ¶
func (UpdatePlayerPassthroughCommand) Name() string
Name returns the command name.
func (UpdatePlayerPassthroughCommand) ProtoDescriptor ¶ added in v0.16.4
func (c UpdatePlayerPassthroughCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (UpdatePlayerPassthroughCommand) SizeWire ¶ added in v0.16.9
func (c UpdatePlayerPassthroughCommand) SizeWire() int
func (UpdatePlayerPassthroughCommand) ToProto ¶ added in v0.14.0
func (c UpdatePlayerPassthroughCommand) ToProto() *pbsystem.UpdatePlayerPassthroughCommand
func (UpdatePlayerPassthroughCommand) UnmarshalWire ¶ added in v0.15.0
func (c UpdatePlayerPassthroughCommand) UnmarshalWire(data []byte) (any, error)
type UpdatePlayerPassthroughResult ¶
type UpdatePlayerPassthroughResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
Player component.PlayerComponent `json:"player"`
}
UpdatePlayerPassthroughResult is sent back to the client after UpdatePlayerPassthroughCommand.
func (UpdatePlayerPassthroughResult) AppendWire ¶ added in v0.16.9
func (c UpdatePlayerPassthroughResult) AppendWire(b []byte) []byte
func (UpdatePlayerPassthroughResult) FromProto ¶ added in v0.15.0
func (c UpdatePlayerPassthroughResult) FromProto(p *pbsystem.UpdatePlayerPassthroughResult) UpdatePlayerPassthroughResult
func (UpdatePlayerPassthroughResult) MarshalWire ¶ added in v0.15.0
func (c UpdatePlayerPassthroughResult) MarshalWire() []byte
func (UpdatePlayerPassthroughResult) Name ¶
func (r UpdatePlayerPassthroughResult) Name() string
Name returns the request-prefixed event name.
func (UpdatePlayerPassthroughResult) ProtoDescriptor ¶ added in v0.16.4
func (c UpdatePlayerPassthroughResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (UpdatePlayerPassthroughResult) SizeWire ¶ added in v0.16.9
func (c UpdatePlayerPassthroughResult) SizeWire() int
func (UpdatePlayerPassthroughResult) ToProto ¶ added in v0.15.0
func (c UpdatePlayerPassthroughResult) ToProto() *pbsystem.UpdatePlayerPassthroughResult
func (UpdatePlayerPassthroughResult) UnmarshalWire ¶ added in v0.15.0
func (c UpdatePlayerPassthroughResult) UnmarshalWire(data []byte) (any, error)
type UpdateSessionPassthroughCommand ¶
type UpdateSessionPassthroughCommand struct {
RequestID string `json:"request_id"` // For matching request/response
PassthroughData string `json:"passthrough_data"`
}
UpdateSessionPassthroughCommand updates the session passthrough data (leader only).
func (UpdateSessionPassthroughCommand) AppendWire ¶ added in v0.16.9
func (c UpdateSessionPassthroughCommand) AppendWire(b []byte) []byte
func (UpdateSessionPassthroughCommand) FromProto ¶ added in v0.14.0
func (c UpdateSessionPassthroughCommand) FromProto(p *pbsystem.UpdateSessionPassthroughCommand) UpdateSessionPassthroughCommand
func (UpdateSessionPassthroughCommand) MarshalWire ¶ added in v0.15.0
func (c UpdateSessionPassthroughCommand) MarshalWire() []byte
func (UpdateSessionPassthroughCommand) Name ¶
func (UpdateSessionPassthroughCommand) Name() string
Name returns the command name.
func (UpdateSessionPassthroughCommand) ProtoDescriptor ¶ added in v0.16.4
func (c UpdateSessionPassthroughCommand) ProtoDescriptor() protoreflect.MessageDescriptor
func (UpdateSessionPassthroughCommand) SizeWire ¶ added in v0.16.9
func (c UpdateSessionPassthroughCommand) SizeWire() int
func (UpdateSessionPassthroughCommand) ToProto ¶ added in v0.14.0
func (c UpdateSessionPassthroughCommand) ToProto() *pbsystem.UpdateSessionPassthroughCommand
func (UpdateSessionPassthroughCommand) UnmarshalWire ¶ added in v0.15.0
func (c UpdateSessionPassthroughCommand) UnmarshalWire(data []byte) (any, error)
type UpdateSessionPassthroughResult ¶
type UpdateSessionPassthroughResult struct {
RequestID string `json:"request_id"`
IsSuccess bool `json:"is_success"`
Message string `json:"message"`
}
UpdateSessionPassthroughResult is sent back to the client after UpdateSessionPassthroughCommand.
func (UpdateSessionPassthroughResult) AppendWire ¶ added in v0.16.9
func (c UpdateSessionPassthroughResult) AppendWire(b []byte) []byte
func (UpdateSessionPassthroughResult) FromProto ¶ added in v0.15.0
func (c UpdateSessionPassthroughResult) FromProto(p *pbsystem.UpdateSessionPassthroughResult) UpdateSessionPassthroughResult
func (UpdateSessionPassthroughResult) MarshalWire ¶ added in v0.15.0
func (c UpdateSessionPassthroughResult) MarshalWire() []byte
func (UpdateSessionPassthroughResult) Name ¶
func (r UpdateSessionPassthroughResult) Name() string
Name returns the request-prefixed event name.
func (UpdateSessionPassthroughResult) ProtoDescriptor ¶ added in v0.16.4
func (c UpdateSessionPassthroughResult) ProtoDescriptor() protoreflect.MessageDescriptor
func (UpdateSessionPassthroughResult) SizeWire ¶ added in v0.16.9
func (c UpdateSessionPassthroughResult) SizeWire() int
func (UpdateSessionPassthroughResult) ToProto ¶ added in v0.15.0
func (c UpdateSessionPassthroughResult) ToProto() *pbsystem.UpdateSessionPassthroughResult
func (UpdateSessionPassthroughResult) UnmarshalWire ¶ added in v0.15.0
func (c UpdateSessionPassthroughResult) UnmarshalWire(data []byte) (any, error)