v0.2.2 Latest Latest

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

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 5 Imported by: 1




This section is empty.


This section is empty.


This section is empty.


type PlayerInfo

type PlayerInfo struct {
	Players      uint8
	MaxPlayers   uint8
	PlayersDelta int8

A PlayerInfo contains information about player counts on a Rust server and methods to read it's state

type Querier

type Querier struct {

	Name       string
	PlayerInfo PlayerInfo
	// contains filtered or unexported fields

A Querier queries and contains information about a Rust server

func NewQuerier

func NewQuerier(server ServerConfig) (*Querier, error)

NewQuerier creats a new Server for observing a Rust server

func (*Querier) AddListener

func (sq *Querier) AddListener(l chan QueryResult)

func (*Querier) Close

func (sq *Querier) Close()

func (*Querier) Update

func (sq *Querier) Update() error

Update queries a Rust server and updates Server with it's new information

type QueryInfo

type QueryInfo struct {
	Name       string
	Players    uint8
	MaxPlayers uint8

type QueryProvider

type QueryProvider interface {
	QueryInfo() (*valve.ServerInfo, error)

type QueryResult

type QueryResult struct {
	Online    bool
	Timestamp time.Time

type ServerConfig

type ServerConfig struct {
	Hostname string
	Port     int

A ServerConfig is the connection information for a Rust server

type Watcher

type Watcher struct {
	// contains filtered or unexported fields

func NewWatcher

func NewWatcher(config ServerConfig, pDeltaFreq int, statusChan chan string) (*Watcher, error)

func (*Watcher) Start

func (w *Watcher) Start() error

func (*Watcher) Stop

func (w *Watcher) Stop()

Jump to

Keyboard shortcuts

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