Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliveStatus ¶
type AliveStatus string
const ( AliveStatusUp AliveStatus = "UP" AliveStatusDown AliveStatus = "DOWN" )
AliveStatus is type that describes aliveness flags.
type CredentialOption ¶
type CredentialOption string
const ( MonitoringIdentifier = "vatz" ApplicationDefaultCredentials CredentialOption = "ADC" ServiceAccountCredentials CredentialOption = "SAC" APIKey CredentialOption = "APIKey" OAuth2 CredentialOption = "OAuth" )
type CronTabSt ¶
type CronTabSt struct { Crontab *cron.Cron `json:"crontab"` EntityID int `json:"entity_id"` }
CronTabSt is crontab structure.
type DiscordMsg ¶
type DiscordMsg struct { Username string `json:"username,omitempty"` AvatarURL string `json:"avatar_url,omitempty"` Content string `json:"content,omitempty"` Embeds []Embed `json:"embeds"` }
DiscordMsg is type for sending messages to a discord.
type Embed ¶
type Embed struct { Author struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` IconURL string `json:"icon_url,omitempty"` } `json:"author,omitempty"` Title string `json:"title"` URL string `json:"url,omitempty"` Timestamp time.Time `json:"timestamp"` Description string `json:"description"` Color DiscordColor `json:"color"` Fields []Field `json:"fields,omitempty"` Thumbnail struct { URL string `json:"url,omitempty"` } `json:"thumbnail,omitempty"` Image struct { URL string `json:"url,omitempty"` } `json:"image,omitempty"` Text string `json:"text,omitempty"` IconURL string `json:"icon_url,omitempty"` } `json:"footer,omitempty"` }
Embed is information for a detailed message.
type Field ¶
type Field struct { Name string `json:"name,omitempty"` Value string `json:"value,omitempty"` Inline bool `json:"inline,omitempty"` }
Field is a structure for embeds that can be omitted.
type Initializer ¶
type Initializer string
const ( TEST Initializer = "TEST" LIVE Initializer = "LIVE" )
type NotifyInfo ¶
type NotifyInfo struct { Plugin string `json:"plugin"` Method string `json:"method"` Address string `json:"address"` Port int `json:"port"` Severity pluginpb.SEVERITY `json:"severity"` State pluginpb.STATE `json:"state"` ExecuteMsg string `json:"execute_msg"` }
NotifyInfo contains detail dispatcher configs.
type PluginState ¶
type PluginStatus ¶
type PluginStatus struct { Plugin config.Plugin `json:"plugin"` IsAlive AliveStatus `json:"is_alive"` LastCheck time.Time `json:"last_check"` }
PluginStatus describes detail status of plugin.
type ReqMsg ¶
type ReqMsg struct { FuncName string `json:"func_name"` State pluginpb.STATE `json:"state"` Msg string `json:"msg"` Severity pluginpb.SEVERITY `json:"severity"` ResourceType string `json:"resource_type"` Options map[string]interface{} `json:"options"` }
ReqMsg is Setup message into GRPC Type.
func (*ReqMsg) UpdateSeverity ¶
UpdateSeverity is to uptade the severity of pluginpb.
func (*ReqMsg) UpdateState ¶
UpdateState is to uptade the state of pluginpb.
Click to show internal directories.
Click to hide internal directories.