config

package
v0.0.1-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2018 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterLogConfig

func RegisterLogConfig(cmd *cobra.Command)

RegisterLogConfig is used by commands to register the log config flags.

func RegisterNomadConfig

func RegisterNomadConfig(cmd *cobra.Command)

RegisterNomadConfig is used by commands to register the Nomad config flags.

func RegisterSlackConfig

func RegisterSlackConfig(cmd *cobra.Command)

RegisterSlackConfig is used by commands to register the Slack config flags.

Types

type LogConfig

type LogConfig struct {
	LogLevel  string
	LogFormat string
	UseColor  bool
}

LogConfig is the nomad-toast logging config struct.

func GetLogConfig

func GetLogConfig() LogConfig

GetLogConfig uses viper to populate a LogConfig struct with values.

type NomadConfig

type NomadConfig struct {
	AllowStale   bool
	NomadAddress string
}

NomadConfig is the nomad-toast Nomad client config struct.

func GetNomadConfig

func GetNomadConfig() NomadConfig

GetNomadConfig uses viper to populate a NomadConfig struct with values.

type SlackConfig

type SlackConfig struct {
	AuthToken string
	Channel   string
}

SlackConfig is the nomad-toast Slack config struct.

func GetSlackConfig

func GetSlackConfig() SlackConfig

GetSlackConfig uses viper to populate a SlackConfig struct with values.

type ToastConfig

type ToastConfig struct {
	Nomad *NomadConfig
	Slack *SlackConfig
}

ToastConfig is the overall config struct used for running nomad-toast.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL