Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opts ¶
type Opts struct { // logger Logger struct { Debug bool `long:"log.debug" env:"LOG_DEBUG" description:"debug mode"` Development bool `long:"log.devel" env:"LOG_DEVEL" description:"development mode"` Json bool `long:"log.json" env:"LOG_JSON" description:"Switch log output to json format"` } Server struct { // general options Bind string `long:"server.bind" env:"SERVER_BIND" description:"Server address" default:":8080"` ReadTimeout time.Duration `long:"server.timeout.read" env:"SERVER_TIMEOUT_READ" description:"Server read timeout" default:"5s"` WriteTimeout time.Duration `long:"server.timeout.write" env:"SERVER_TIMEOUT_WRITE" description:"Server write timeout" default:"10s"` } Scrape struct { Time time.Duration `long:"scrape.time" env:"SCRAPE_TIME" description:"Scrape time in seconds" default:"1m"` } // Api option Azure struct { InstanceApiUrl string `` /* 190-byte string literal not displayed */ ScheduledEventsApiUrl string `` /* 197-byte string literal not displayed */ Timeout time.Duration `` /* 130-byte string literal not displayed */ ErrorThreshold int `` /* 155-byte string literal not displayed */ ApproveScheduledEvent bool `` /* 149-byte string literal not displayed */ } Instance struct { VmNodeName string `long:"vm.nodename" env:"VM_NODENAME" description:"VM node name"` } Drain struct { Enable bool `long:"drain.enable" env:"DRAIN_ENABLE" description:"Enable drain handling"` Mode string `long:"drain.mode" env:"DRAIN_MODE" description:"Mode" choice:"kubernetes" choice:"command"` //nolint:golint,staticcheck NotBefore time.Duration `long:"drain.not-before" env:"DRAIN_NOT_BEFORE" description:"Dont drain before this time" default:"5m"` Events []string `` //nolint:staticcheck /* 175-byte string literal not displayed */ WaitBeforeCmd time.Duration `` /* 130-byte string literal not displayed */ WaitAfterCmd time.Duration `` /* 130-byte string literal not displayed */ } Command struct { Test struct { Cmd string `long:"command.test.cmd" env:"COMMAND_TEST_CMD" description:"Test command in command mode"` } Drain struct { Cmd string `long:"command.drain.cmd" env:"COMMAND_DRAIN_CMD" description:"Drain command in command mode"` } Uncordon struct { Cmd string `long:"command.uncordon.cmd" env:"COMMAND_UNCORDON_CMD" description:"Uncordon command in command mode"` } } Kubernetes struct { NodeName string `long:"kube.nodename" env:"KUBE_NODENAME" description:"Kubernetes node name"` Drain struct { Args []string `long:"kube.drain.args" env:"KUBE_DRAIN_ARGS" description:"Arguments for kubectl drain" env-delim:" "` DryRun bool `long:"kube.drain.dry-run" env:"KUBE_DRAIN_DRY_RUN" description:"Do not drain, uncordon or label any node"` } } Notification struct { List []string `` /* 167-byte string literal not displayed */ MsgTemplate string `long:"notification.messagetemplate" env:"NOTIFICATION_MESSAGE_TEMPLATE" description:"Notification template" default:"%v"` } Metrics struct { RequestStats bool `long:"metrics-requeststats" env:"METRICS_REQUESTSTATS" description:"Enable request stats metrics"` } }
Click to show internal directories.
Click to hide internal directories.