setup

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package setup contains common logic for setting up the export package across binaries.

Index

Constants

View Source
const (
	HABackendNone       = "none"
	HABackendKubernetes = "kube"
)

Supported HA backend modes.

View Source
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

This section is empty.

Functions

func ExtraArgs added in v0.4.1

func ExtraArgs() ([]string, error)

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, userAgent 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.

func Global

func Global() *export.Exporter

Global returns the global instance of the GCM exporter.

func SetGlobal

func SetGlobal(exporter *export.Exporter) (err error)

SetGlobal sets the global instance of the GCM exporter.

Types

This section is empty.

Jump to

Keyboard shortcuts

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