Documentation
¶
Index ¶
- type Client
- func (client *Client) CollectStats(done chan struct{}, wg *sync.WaitGroup)
- func (client *Client) InitClient(host string, port int, database string, username string, password string, ...)
- func (client *Client) OnMessageMonitoredStat(message []byte)
- func (client *Client) RegisterInternalStat(scriptpath string, interval int)
- func (client *Client) RegisterInvokedStat(command string, scriptpath string, interval int)
- func (client *Client) RegisterMonitoredStat(pattern string, scriptpath string)
- type DiscordWebhookData
- type InternalStats
- type MonitoredStats
- type SlackWebhookData
- type Stats
- type StatsImpl
- type TengoDiscordWebhook
- type TengoFieldEscape
- type TengoGlobals
- type TengoLock
- type TengoLogger
- type TengoSlackWebhook
- type TengoTagEscape
- type TengoUnlock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Tag string
Rcon *webrcon.RconClient
Test bool
// contains filtered or unexported fields
}
Client maintains the InfluxDB client connection
func (*Client) CollectStats ¶
CollectStats begins running the configured stats.
func (*Client) InitClient ¶
func (client *Client) InitClient(host string, port int, database string, username string, password string, ssl bool)
InitClient establishes the InfluxDB connection and sets up queues
func (*Client) OnMessageMonitoredStat ¶
OnMessageMonitoredStat implements the RCON client OnMessage callback, to be used for Monitored Stats.
func (*Client) RegisterInternalStat ¶
RegisterInternalStat registers an internal type stat.
func (*Client) RegisterInvokedStat ¶
RegisterInvokedStat registers an invoked type stat.
func (*Client) RegisterMonitoredStat ¶
RegisterMonitoredStat registers a stat based on monitoring the RCON data.
type DiscordWebhookData ¶
type DiscordWebhookData struct {
Username string `json:"username,omitempty"`
Content string `json:"content"`
}
DiscordWebhookData contains a simple webhook message, no embed support (yet, maybe I dunno)
type InternalStats ¶
type InternalStats struct {
StatsImpl
// contains filtered or unexported fields
}
InternalStats stats, or rather stats that just run at an interval with not RCON command.
type MonitoredStats ¶
type MonitoredStats struct {
StatsImpl
// contains filtered or unexported fields
}
MonitoredStats style stats.
type SlackWebhookData ¶
type SlackWebhookData struct {
Text string `json:"text"`
}
SlackWebhookData contains the webhook message for slack
type Stats ¶
type Stats struct {
StatsImpl
// contains filtered or unexported fields
}
Stats contains the configured stats plugins
type StatsImpl ¶
type StatsImpl struct {
// contains filtered or unexported fields
}
StatsImpl defines the data all stat types use.
type TengoDiscordWebhook ¶
type TengoDiscordWebhook struct {
tengo.ObjectImpl
}
TengoDiscordWebhook defines the object for sending a discord webhook
func (*TengoDiscordWebhook) Call ¶
Call provides the logger functionality. discord_webhook(hookurl, content, [optional]username)
func (*TengoDiscordWebhook) CanCall ¶
func (o *TengoDiscordWebhook) CanCall() bool
CanCall returns true since we're a function type.
func (*TengoDiscordWebhook) String ¶
func (o *TengoDiscordWebhook) String() string
String returns the function name
func (*TengoDiscordWebhook) TypeName ¶
func (o *TengoDiscordWebhook) TypeName() string
TypeName returns the function name
type TengoFieldEscape ¶
type TengoFieldEscape struct {
tengo.ObjectImpl
}
TengoFieldEscape defines the object for escaping field values
func (*TengoFieldEscape) CanCall ¶
func (o *TengoFieldEscape) CanCall() bool
CanCall returns true since we're a function type.
func (*TengoFieldEscape) String ¶
func (o *TengoFieldEscape) String() string
String returns the function name
func (*TengoFieldEscape) TypeName ¶
func (o *TengoFieldEscape) TypeName() string
TypeName returns the function name
type TengoGlobals ¶
type TengoGlobals struct {
tengo.ObjectImpl
}
TengoGlobals defines the object that holds globals. We need this to enforce concurrency safety.
func (*TengoGlobals) IndexSet ¶
func (o *TengoGlobals) IndexSet(index, value tengo.Object) (err error)
IndexSet sets the value for the given key.
func (*TengoGlobals) String ¶
func (o *TengoGlobals) String() string
String returns a string representation
func (*TengoGlobals) TypeName ¶
func (o *TengoGlobals) TypeName() string
TypeName returns the type name
type TengoLock ¶
type TengoLock struct {
tengo.ObjectImpl
}
TengoLock defines the object type for a generic mutex lock function
type TengoLogger ¶
type TengoLogger struct {
tengo.ObjectImpl
}
TengoLogger defines the object type for the logger functions
func (*TengoLogger) CanCall ¶
func (o *TengoLogger) CanCall() bool
CanCall returns true since we're a function type.
func (*TengoLogger) TypeName ¶
func (o *TengoLogger) TypeName() string
TypeName returns the logger name
type TengoSlackWebhook ¶
type TengoSlackWebhook struct {
tengo.ObjectImpl
}
TengoSlackWebhook defines the object for sending a slack webhook
func (*TengoSlackWebhook) Call ¶
Call provides the logger functionality. slack_webhook(hookurl, text)
func (*TengoSlackWebhook) CanCall ¶
func (o *TengoSlackWebhook) CanCall() bool
CanCall returns true since we're a function type.
func (*TengoSlackWebhook) String ¶
func (o *TengoSlackWebhook) String() string
String returns the function name
func (*TengoSlackWebhook) TypeName ¶
func (o *TengoSlackWebhook) TypeName() string
TypeName returns the function name
type TengoTagEscape ¶
type TengoTagEscape struct {
tengo.ObjectImpl
}
TengoTagEscape defines the object type for escaping tag values
func (*TengoTagEscape) CanCall ¶
func (o *TengoTagEscape) CanCall() bool
CanCall returns true since we're a function type.
func (*TengoTagEscape) String ¶
func (o *TengoTagEscape) String() string
String returns the function name
func (*TengoTagEscape) TypeName ¶
func (o *TengoTagEscape) TypeName() string
TypeName returns the function name
type TengoUnlock ¶
type TengoUnlock struct {
tengo.ObjectImpl
}
TengoUnlock defines the object type for a generic mutex unlock function
func (*TengoUnlock) CanCall ¶
func (o *TengoUnlock) CanCall() bool
CanCall returns true since we're a function type.
func (*TengoUnlock) TypeName ¶
func (o *TengoUnlock) TypeName() string
TypeName returns the name unlock