Documentation ¶
Index ¶
- type Faucet
- type LobbyEntry
- type LobbyRegistry
- func (r *LobbyRegistry) AddPlayer(lobbyId string, player common.Address) error
- func (r *LobbyRegistry) Cleanup(inactivityDuration time.Duration)
- func (r *LobbyRegistry) GetPlayerAddresses(lobbyId string) ([]common.Address, bool)
- func (r *LobbyRegistry) NewLobby() string
- func (r *LobbyRegistry) StartCleanupScheduler(ctx context.Context, inactivityDuration time.Duration, interval time.Duration)
- type Server
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LobbyEntry ¶
func (*LobbyEntry) GetPlayers ¶
func (l *LobbyEntry) GetPlayers() []common.Address
type LobbyRegistry ¶
type LobbyRegistry struct { Lobbies map[string]*LobbyEntry // contains filtered or unexported fields }
func NewLobbyRegistry ¶
func NewLobbyRegistry() *LobbyRegistry
NewLobbyRegistry creates a new lobby registry.
func (*LobbyRegistry) AddPlayer ¶
func (r *LobbyRegistry) AddPlayer(lobbyId string, player common.Address) error
AddPlayer adds a player to the specified lobby. Returns an error if the lobby does not exist.
func (*LobbyRegistry) Cleanup ¶
func (r *LobbyRegistry) Cleanup(inactivityDuration time.Duration)
func (*LobbyRegistry) GetPlayerAddresses ¶
func (r *LobbyRegistry) GetPlayerAddresses(lobbyId string) ([]common.Address, bool)
GetLobby retrieves a lobby by its ID. It returns false if the lobby does not exist.
func (*LobbyRegistry) NewLobby ¶
func (r *LobbyRegistry) NewLobby() string
NewLobby creates a new lobby and returns its ID.
func (*LobbyRegistry) StartCleanupScheduler ¶
Click to show internal directories.
Click to hide internal directories.