Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrLabelRead = "read" ErrLabelUnmarshall = "unmarshal" ErrLabelStart = "start" SigLabelOk = "ok" SigLabelFail = "fail" )
Variables ¶
View Source
var ( CmdRunDesc = map[CmdRunReason]string{ CmdRunNoLabelMatch: "No match for alert labels", CmdRunNoMax: "No maximum simultaneous command limit defined", CmdRunNoFinger: "No fingerprint found for command", CmdRunFingerUnder: "Command count for fingerprint is under limit", CmdRunFingerOver: "Command count for fingerprint is over limit", } // These labels are meant to be applied to prometheus metrics CmdRunLabel = map[CmdRunReason]string{ CmdRunNoLabelMatch: "nomatch", CmdRunNoMax: "nomax", CmdRunNoFinger: "nofinger", CmdRunFingerUnder: "fingerunder", CmdRunFingerOver: "fingerover", } )
Functions ¶
func StopServer ¶ added in v0.1.3
Types ¶
type CmdRunReason ¶
type CmdRunReason int
const ( // Enum for reasons for why a command could or couldn't run CmdRunNoLabelMatch CmdRunReason = iota CmdRunNoMax CmdRunNoFinger CmdRunFingerUnder CmdRunFingerOver )
func (CmdRunReason) Label ¶
func (r CmdRunReason) Label() string
Label returns a prometheus-compatible label for a reason why a command could or couldn't run
func (CmdRunReason) String ¶
func (r CmdRunReason) String() string
String returns a string representation of the reason why a command could or couldn't run
type CommandDetails ¶
func DefaultCommandDetails ¶ added in v0.1.3
func DefaultCommandDetails(cmd string, args []string, terraformScheduling string) CommandDetails
Give default to CommandDetails
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(initConfig *config.InitConfig, config *config.Config) *Server
NewServer returns a new server instance
Click to show internal directories.
Click to hide internal directories.