Documentation ¶
Index ¶
- func NewErrPaperTPS(text string, count int) error
- type DynmapChunkloadingStat
- type DynmapRenderStat
- type EntityCount
- type ErrForgeTPS
- type ErrPaperTPS
- type ErrRCONConnectionTimeout
- type ErrRCONMissingHost
- type ErrRCONMissingPassword
- type ErrRCONMissingPort
- type RCONClient
- func (c *RCONClient) Close() error
- func (c *RCONClient) CloseConn() error
- func (c *RCONClient) GetDynmapStats() ([]DynmapRenderStat, []DynmapChunkloadingStat, error)
- func (c *RCONClient) GetForgeEntities() ([]EntityCount, error)
- func (c *RCONClient) GetForgeTPS() ([]TPSStat, TPSStat, error)
- func (c *RCONClient) GetPaperTPS() ([]float64, error)
- func (c *RCONClient) GetPlayersOnline() []string
- type RCONCollector
- type TPSStat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrPaperTPS ¶
Types ¶
type DynmapChunkloadingStat ¶
type DynmapRenderStat ¶
type EntityCount ¶
type ErrForgeTPS ¶
type ErrForgeTPS struct{}
func (ErrForgeTPS) Error ¶
func (e ErrForgeTPS) Error() string
type ErrPaperTPS ¶
func (*ErrPaperTPS) Error ¶
func (e *ErrPaperTPS) Error() string
type ErrRCONConnectionTimeout ¶
type ErrRCONConnectionTimeout struct{}
func (ErrRCONConnectionTimeout) Error ¶
func (e ErrRCONConnectionTimeout) Error() string
type ErrRCONMissingHost ¶
type ErrRCONMissingHost struct{}
func (ErrRCONMissingHost) Error ¶
func (e ErrRCONMissingHost) Error() string
type ErrRCONMissingPassword ¶
type ErrRCONMissingPassword struct{}
func (ErrRCONMissingPassword) Error ¶
func (e ErrRCONMissingPassword) Error() string
type ErrRCONMissingPort ¶
type ErrRCONMissingPort struct{}
func (ErrRCONMissingPort) Error ¶
func (e ErrRCONMissingPort) Error() string
type RCONClient ¶
type RCONClient struct {
// contains filtered or unexported fields
}
func NewRCONClient ¶
func NewRCONClient(host string, port int, password string) (*RCONClient, error)
Creates an RCON client, does not create a connection immediatly
func (*RCONClient) Close ¶
func (c *RCONClient) Close() error
Close the RCON connection if necessary
func (*RCONClient) CloseConn ¶
func (c *RCONClient) CloseConn() error
Closes the RCON Connection and sets it to nil
func (*RCONClient) GetDynmapStats ¶
func (c *RCONClient) GetDynmapStats() ([]DynmapRenderStat, []DynmapChunkloadingStat, error)
Get the render statistics returned from Dynmap
func (*RCONClient) GetForgeEntities ¶
func (c *RCONClient) GetForgeEntities() ([]EntityCount, error)
Get the count and name of all loaded forge entities
func (*RCONClient) GetForgeTPS ¶
func (c *RCONClient) GetForgeTPS() ([]TPSStat, TPSStat, error)
Get the TPS statistics returned from forge
func (*RCONClient) GetPaperTPS ¶
func (c *RCONClient) GetPaperTPS() ([]float64, error)
Get the TPS statistics returned from paper
func (*RCONClient) GetPlayersOnline ¶
func (c *RCONClient) GetPlayersOnline() []string
Return a list of all players currently online
type RCONCollector ¶
type RCONCollector struct { ServerType string DynmapEnabled bool // contains filtered or unexported fields }
func NewRCONCollector ¶
func NewRCONCollector(cfg config.Config) (*RCONCollector, error)
Create new instance of collector, returns error if RCON is not correctly configured not provided Arguments:
cfg: Configuration for minecraft-exporter. Needs RCON to be filled out in full
func (*RCONCollector) Collect ¶
func (c *RCONCollector) Collect(ch chan<- prometheus.Metric)
Implements the Collect function for prometheus.Collector
func (*RCONCollector) Describe ¶
func (c *RCONCollector) Describe(ch chan<- *prometheus.Desc)
Implements the Describe function for prometheus.Collector
Click to show internal directories.
Click to hide internal directories.