Documentation
¶
Index ¶
- func ParseDuration(duration string) (time.Duration, error)
- type DynamicConfig
- func (c *DynamicConfig) GetBool(groupName, key string) bool
- func (c *DynamicConfig) GetDuration(groupName, key string) *time.Duration
- func (c *DynamicConfig) GetSchedule(groupName, key string) *cron.Schedule
- func (c *DynamicConfig) GetString(groupName, key string) string
- func (c *DynamicConfig) Reload() error
- type Ops
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamicConfig ¶
type DynamicConfig struct {
// contains filtered or unexported fields
}
DynamicConfig represents the settings specified by configmap
func (*DynamicConfig) GetBool ¶
func (c *DynamicConfig) GetBool(groupName, key string) bool
GetBool returns a bool parsed from a configmap key
func (*DynamicConfig) GetDuration ¶
func (c *DynamicConfig) GetDuration(groupName, key string) *time.Duration
GetDuration returns a time.Duration parsed from a configmap key
func (*DynamicConfig) GetSchedule ¶ added in v0.2.0
func (c *DynamicConfig) GetSchedule(groupName, key string) *cron.Schedule
func (*DynamicConfig) GetString ¶
func (c *DynamicConfig) GetString(groupName, key string) string
GetString returns a string from a configmap
func (*DynamicConfig) Reload ¶
func (c *DynamicConfig) Reload() error
Reload loads the settings from the mounted configmap
type Ops ¶
type Ops struct { DynamicConfig NodeName string `long:"node-name" env:"NODE_NAME" description:"The name of the host node" required:"yes"` LogLevel string `long:"log-level" env:"LOG_LEVEL" description:"Log level" default:"info"` BindAddr string `long:"bind-address" short:"p" env:"BIND_ADDRESS" default:":9656" description:"address for binding metrics listener"` PollPeriod string `long:"poll-period" env:"POLL_PERIOD" description:"Check for deletion every period (5s, 3m, 1h, ...)" default:"15s"` AwsPollPeriod string `long:"aws-poll-period" env:"AWS_POLL_PERIOD" description:"Update aws state every period" default:"30s"` InstanceGroupLabel string `` /* 129-byte string literal not displayed */ RequestDeletionLabel string `long:"request-deletion-label" env:"REQUEST_DELETION_LABEL" description:"Delete this node if it has this label"` ForceDeletionLabel string `` /* 148-byte string literal not displayed */ AwsAsgFilter string `` /* 143-byte string literal not displayed */ AwsAsgNameTag string `long:"aws-asg-name-tag" env:"AWS_ASG_NAME_TAG" description:"The tag on an ASG that should be interpreted as its name"` Namespace string `long:"namespace" env:"NAMESPACE" description:"The namespace the controller resides in" required:"true"` LockConfigMapName string `` /* 134-byte string literal not displayed */ }
Ops represents the commandline/environment options for the program
Click to show internal directories.
Click to hide internal directories.