Documentation ¶
Overview ¶
Package setup contains common logic for setting up the export package across binaries.
Index ¶
Constants ¶
const ( // Supported HA backend modes. HABackendNone = "none" HABackendKubernetes = "kube" // User agent environments. UAEnvGKE = "gke" UAEnvGCE = "gce" UAEnvUnspecified = "unspecified" // User agent modes. UAModeGKE = "gke" UAModeKubectl = "kubectl" UAModeUnspecified = "unspecified" UAModeAVMW = "on-prem" UAModeABM = "baremetal" )
const ExtraArgsEnvvar = "EXTRA_ARGS"
Environment variable that contains additional command line arguments. It can be used to inject additional arguments when the regular ones cannot be easily modified.
Variables ¶
var ErrLocationGlobal = errors.New("Location must be set to a named Google Cloud " +
"region and cannot be set to \"global\". Please choose the " +
"Google Cloud region that is physically nearest to your cluster. " +
"See https://www.cloudinfrastructuremap.com/")
Functions ¶
func ExtraArgs ¶ added in v0.4.1
ExtraArgs returns additional command line arguments extracted from the EXTRA_ARGS. environment variable. It is parsed like a shell parses arguments. For example: EXTRA_ARGS="--foo=bar -x 123". It can be used like `flagset.Parse(append(os.Args[1:], ExtraArgs()...))`.
func FromFlags ¶
func FromFlags(a *kingpin.Application, userAgentProduct string) func(log.Logger, prometheus.Registerer) (*export.Exporter, error)
FromFlags returns a constructor for a new exporter that is configured through flags that are registered with the given application. The constructor must be called after the flags have been parsed.
Types ¶
This section is empty.