dockerswarm

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

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"`

	HTTPClientConfig  promauth.HTTPClientConfig  `yaml:",inline"`
	ProxyURL          *proxy.URL                 `yaml:"proxy_url,omitempty"`
	ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"`
}

SDConfig represents docker swarm service discovery configuration

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

func (*SDConfig) GetLabels

func (sdc *SDConfig) GetLabels(baseDir string) ([]*promutils.Labels, error)

GetLabels returns dockerswarm labels according to sdc.

func (*SDConfig) MustStop

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