docker

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package docker implements the discovery.docker component.

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	Port:               80,
	HostNetworkingHost: "localhost",
	RefreshInterval:    time.Minute,
	HTTPClientConfig:   config.DefaultHTTPClientConfig,
}

DefaultArguments holds default values for Arguments.

Functions

func New

func New(opts component.Options, args Arguments) (*discovery.Component, error)

New returns a new instance of a discovery.docker component.

Types

type Arguments

type Arguments struct {
	Host               string                  `river:"host,attr"`
	Port               int                     `river:"port,attr,optional"`
	HostNetworkingHost string                  `river:"host_networking_host,attr,optional"`
	RefreshInterval    time.Duration           `river:"refresh_interval,attr,optional"`
	Filters            []Filter                `river:"filter,block,optional"`
	HTTPClientConfig   config.HTTPClientConfig `river:",squash"`
}

Arguments configures the discovery.docker component.

func (Arguments) Convert

func (args Arguments) Convert() moby.DockerSDConfig

Convert converts Arguments to the upstream Prometheus SD type.

func (*Arguments) SetToDefault added in v0.35.0

func (args *Arguments) SetToDefault()

SetToDefault implements river.Defaulter.

func (*Arguments) Validate added in v0.35.0

func (args *Arguments) Validate() error

Validate implements river.Validator.

type Filter

type Filter struct {
	Name   string   `river:"name,attr"`
	Values []string `river:"values,attr"`
}

Filter is used to limit the discovery process to a subset of available resources.

func (Filter) Convert

func (f Filter) Convert() moby.Filter

Convert converts a Filter to the upstream Prometheus SD type.

Jump to

Keyboard shortcuts

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