Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionOptions ¶
type ConnectionOptions struct { Addr string Mode config.QueryMode RCONPassword string ConnectTimeout time.Duration CacheExpiration time.Duration CacheCleanupInterval time.Duration }
ConnectionOptions options for a Connection
type IConnection ¶
type IConnection interface { Reconnect() error Close() GetMap() (string, error) GetPlayerCount() (*models.PlayerCount, error) GetPlayers() (map[string]*models.Player, error) }
func NewRCON ¶
func NewRCON(name string, opts *ConnectionOptions) IConnection
func NewServerQuery ¶
func NewServerQuery(name string, opts *ConnectionOptions, log *logrus.Logger) IConnection
type RCON ¶
type RCON struct {
// contains filtered or unexported fields
}
func (*RCON) GetPlayerCount ¶
func (c *RCON) GetPlayerCount() (*models.PlayerCount, error)
GetPlayerCount return server player count
type ServerQuery ¶
type ServerQuery struct {
// contains filtered or unexported fields
}
func (*ServerQuery) GetMap ¶
func (c *ServerQuery) GetMap() (string, error)
GetMap return map of server
func (*ServerQuery) GetPlayerCount ¶
func (c *ServerQuery) GetPlayerCount() (*models.PlayerCount, error)
GetPlayerCount return server player count
func (*ServerQuery) GetPlayers ¶
func (c *ServerQuery) GetPlayers() (map[string]*models.Player, error)
func (*ServerQuery) Reconnect ¶
func (c *ServerQuery) Reconnect() error
Click to show internal directories.
Click to hide internal directories.