Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asterisk ¶
type Asterisk interface {
// Info gets data about the asterisk system
Info(key *key.Key) (*AsteriskInfo, error)
}
Asterisk represents a communication path for the Asterisk server for system-level resources
type AsteriskInfo ¶
type AsteriskInfo struct {
BuildInfo BuildInfo `json:"build"`
ConfigInfo ConfigInfo `json:"config"`
StatusInfo StatusInfo `json:"status"`
SystemInfo SystemInfo `json:"system"`
}
AsteriskInfo describes a running asterisk system
type AsteriskVariables ¶
type AsteriskVariables interface {
// Get returns the value of the given variable; the ID field of the Key is the variable name
Get(key *key.Key) (string, error)
// Set sets the variable; the ID field of the Key is the variable name
Set(key *key.Key, value string) error
}
AsteriskVariables is an interface to interact with Asterisk global variables
type BuildInfo ¶
type BuildInfo struct {
Date string `json:"date"`
Kernel string `json:"kernel"`
Machine string `json:"machine"`
Options string `json:"options"`
Os string `json:"os"`
User string `json:"user"`
}
BuildInfo describes information about how Asterisk was built
type ConfigInfo ¶
type ConfigInfo struct {
DefaultLanguage string `json:"default_language"`
MaxChannels int `json:"max_channels,omitempty"` //omitempty denotes an optional field, meaning the field may not be present if no value is assigned.
MaxLoad float64 `json:"max_load,omitempty"`
MaxOpenFiles int `json:"max_open_files,omitempty"`
Name string `json:"name"` // Asterisk system name
SetID SetID `json:"setid"` // Effective user/group id under which Asterisk is running
}
ConfigInfo describes information about the Asterisk configuration
type SetID ¶
type SetID struct {
Group string `json:"group"` // group id (not name? why string?)
User string `json:"user"` // user id (not name? why string?)
}
SetID describes a userid/groupid pair
type StatusInfo ¶
type StatusInfo struct {
LastReloadTime arioptions.DateTime `json:"last_reload_time"`
StartupTime arioptions.DateTime `json:"startup_time"`
}
StatusInfo describes the state of an Asterisk system
type SystemInfo ¶
SystemInfo describes information about the Asterisk system
Click to show internal directories.
Click to hide internal directories.