dockerswarm

package
v1.56.0-cluster Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter added in v1.48.0

type Filter struct {
	Name   string   `yaml:"name"`
	Values []string `yaml:"values"`
}

Filter is a filter, which can be passed to SDConfig.

type SDConfig

type SDConfig struct {
	Host    string   `yaml:"host"`
	Role    string   `yaml:"role"`
	Port    int      `yaml:"port,omitempty"`
	Filters []Filter `yaml:"filters,omitempty"`

	ProxyURL  proxy.URL           `yaml:"proxy_url,omitempty"`
	TLSConfig *promauth.TLSConfig `yaml:"tls_config,omitempty"`
	// refresh_interval is obtained from `-promscrape.dockerswarmSDCheckInterval` command-line option
	BasicAuth       *promauth.BasicAuthConfig `yaml:"basic_auth,omitempty"`
	BearerToken     string                    `yaml:"bearer_token,omitempty"`
	BearerTokenFile string                    `yaml:"bearer_token_file,omitempty"`
}

SDConfig represents docker swarm service discovery configuration

See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dockerswarm_sd_config

func (*SDConfig) GetLabels added in v1.55.0

func (sdc *SDConfig) GetLabels(baseDir string) ([]map[string]string, error)

GetLabels returns dockerswarm labels according to sdc.

func (*SDConfig) MustStop added in v1.55.0

func (sdc *SDConfig) MustStop()

MustStop stops further usage for sdc.

Jump to

Keyboard shortcuts

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