token

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsExecutionFailed

func IsExecutionFailed(err error) bool

IsExecutionFailed asserts executionFailedError.

func IsNoTokenExpiration

func IsNoTokenExpiration(err error) bool

IsNoTokenExpiration asserts noTokenExpirationError.

Types

type Config

type Config struct {
	Path     string
	VaultURL string
}

Config implements configuration for token exporter.

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter implements metrics exporter for Vault tokens.

func New

func New(config Config) (*Exporter, error)

New creates new Exporter object.

func (*Exporter) Collect

func (e *Exporter) Collect(ch chan<- prometheus.Metric)

Collect implements metric collection by reading Vault token from files and checking ttl of this token by calling Vault API /auth/token/lookup-self. Only first line in every file is read. Files expected to contain either just a uuid token or VAULT_TOKEN=<token> string.

func (*Exporter) Describe

func (e *Exporter) Describe(ch chan<- *prometheus.Desc)

Describe returns metric metadata.

Jump to

Keyboard shortcuts

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