Documentation ¶
Index ¶
- Constants
- func Decode(raw []byte, out interface{}) error
- func Encode(v interface{}) ([]byte, error)
- func NewFormattedMessage(msgtype string, data interface{}) string
- type CredStore
- func (c *CredStore) GetAPIFile(provderType string) string
- func (c *CredStore) GetAPIKey(provderType string) string
- func (c *CredStore) GetOption(provderType string, user string) string
- func (c *CredStore) GetToken(provderType string, user string) []string
- func (c *CredStore) SetOption(provderType string, user string, option string)
- func (c *CredStore) SetToken(provderType string, user string, authkey string)
- type CredentialStore
- type Event
- type EventContainer
- type EventManager
- type EventType
- type Firebase
- type HubAdapter
- type MessageFormat
- type Provider
- type WebHooked
Constants ¶
View Source
const ( AgentDown EventType = "Agent down" AgentUp = "Agent up" MemorySpike = "Memory spike" MemorySpikeOver = "Memory spike over" CPUSpike = "cpu spike" CPUSpikeOver = "cpu spike over " BandwithUsageLimit = "Bandwidth usage limit exceed" NetworkSpike = "Network spike" NetworkSpikeOver = "Network spike over" ServiceCrashed = "Service Crashed" ServiveRunning = "Service running" ProcessCrashed = "process crashed" ProcessRunning = "process running" )
View Source
const ( MemHightThreshold = 20 CPUHightThreshold = 20 EventTimeout = 300 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func NewFormattedMessage ¶
Types ¶
type CredStore ¶
type CredStore struct {
// contains filtered or unexported fields
}
func NewCredStore ¶
func NewCredStore() *CredStore
func (*CredStore) GetAPIFile ¶
type CredentialStore ¶
type CredentialStore interface { GetAPIFile(string) string GetAPIKey(string) string SetToken(string, string, string) GetToken(string, string) []string SetOption(string, string, string) GetOption(string, string) string }
CredentialStore provides storage of keys
type EventContainer ¶
type EventManager ¶
type EventManager struct {
// contains filtered or unexported fields
}
func NewEventManager ¶
func NewEventManager() *EventManager
func (*EventManager) ProcessLog ¶
func (e *EventManager) ProcessLog(agentName, username string, rawlog []byte, ch chan<- []byte)
func (*EventManager) SaveToken ¶
func (e *EventManager) SaveToken(user string, token string)
func (*EventManager) SendEvent ¶
func (e *EventManager) SendEvent(user string, _data string)
type Firebase ¶
type Firebase struct {
// contains filtered or unexported fields
}
Firebase bashed notification provider
type HubAdapter ¶
type HubAdapter struct { }
type MessageFormat ¶
type MessageFormat struct { Type string Data interface{} }
Click to show internal directories.
Click to hide internal directories.