Documentation ¶
Index ¶
- Constants
- func DeregisterCLI(c *cli.Context) error
- func DeregisterK8s(podInfo *k8s.PodInfo, config CommonConfig) (err error)
- func GetDeregisterFlags() []cli.Flag
- func GetRegisterFlags() []cli.Flag
- func RegisterCLI(c *cli.Context) error
- func RegisterK8s(podInfo *k8s.PodInfo, config CommonConfig) (err error)
- type CommonConfig
Constants ¶
View Source
const ( // FlagDebug turn on debugging output FlagDebug = "debug" // EnvDebug turn on debugging output EnvDebug = "DEBUG" // FlagVaaSURL address of the VaaS host to query FlagVaaSURL = "vaas-url" // EnvVaaSURL address of the VaaS host to query EnvVaaSURL = "VAAS_URL" // FlagUser represents the user name for Auth FlagUser = "user" // EnvVaaSUser represents the user name for Auth EnvVaaSUser = "VAAS_USER" // FlagSecretKey client key for Auth FlagSecretKey = "key" // EnvVaaSKey client key for Auth EnvVaaSKey = "VAAS_KEY" // FlagSecretKeyFile client key for Auth FlagSecretKeyFile = "key-file" // EnvVaaSKeyFile client key for Auth EnvVaaSKeyFile = "VAAS_KEY_FILE" // FlagDirector represents the director name FlagDirector = "director" // FlagAddr address of this backend FlagAddress = "addr" // FlagPort represents the port of this backend FlagPort = "port" // FlagCanaryTag FlagCanaryTag = "canary" // IDFileLoc file containing VaaS backend ID IDFileLoc = "/tmp/vaas.id" )
These Flag* consts exist to make any changes to flags consistent across the project
View Source
const ( // DeregisterName is the CLI name of this action DeregisterName = "deregister" // FlagBackendID represents a known backend id that is to be deregistered FlagBackendID = "backend-id, id" )
View Source
const ( // RegisterName is the CLI name of this action RegisterName = "register" // FlagWeight is the weight that a backend in VaaS is initially assigned FlagWeight = "weight" // FlagDC represents datacenter short name as defined in VaaS FlagDC = "dc" // EnvDC Environment var containing datacenter short name as defined in VaaS EnvDC = "CLOUD_DC" // InstanceFormat represents a backend instance tag InstanceFormat = "instance:%s_%d" )
Variables ¶
This section is empty.
Functions ¶
func DeregisterCLI ¶
DeregisterCLI removes a backend from VaaS using CLI data
func DeregisterK8s ¶
func DeregisterK8s(podInfo *k8s.PodInfo, config CommonConfig) (err error)
DeregisterK8s configures a VaaS client from K8s data and removes a backend
func GetDeregisterFlags ¶
GetDeregisterFlags returns a list of flags available for this action
func GetRegisterFlags ¶
GetRegisterFlags returns a list of flags available for this action
func RegisterCLI ¶
RegisterCLI configures a VaaS client from CLI data and runs register()
func RegisterK8s ¶
func RegisterK8s(podInfo *k8s.PodInfo, config CommonConfig) (err error)
RegisterK8s configures a VaaS client from K8s data and runs register()
Types ¶
type CommonConfig ¶
type CommonConfig struct { Debug bool DryRun bool Canary bool Director string Address string VaaSURL string VaaSUser string VaaSKey string VaaSKeyFile string Port int AsyncTimeout time.Duration }
CommonConfig represents common flag values
func (*CommonConfig) GetSecretFromFile ¶ added in v0.1.15
func (config *CommonConfig) GetSecretFromFile(secretFile string) error
GetSecretFromFile reads a value from provided file
Click to show internal directories.
Click to hide internal directories.