digitalocean

package
v0.40.4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	Port:            80,
	RefreshInterval: time.Minute,
	FollowRedirects: true,
	EnableHTTP2:     true,
}

Functions

func New

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

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

Types

type Arguments

type Arguments struct {
	RefreshInterval time.Duration `river:"refresh_interval,attr,optional"`
	Port            int           `river:"port,attr,optional"`

	BearerToken     rivertypes.Secret `river:"bearer_token,attr,optional"`
	BearerTokenFile string            `river:"bearer_token_file,attr,optional"`

	ProxyConfig     *config.ProxyConfig `river:",squash"`
	FollowRedirects bool                `river:"follow_redirects,attr,optional"`
	EnableHTTP2     bool                `river:"enable_http2,attr,optional"`
}

func (*Arguments) Convert

func (a *Arguments) Convert() *prom_discovery.SDConfig

func (*Arguments) SetToDefault added in v0.35.0

func (a *Arguments) SetToDefault()

SetToDefault implements river.Defaulter.

func (*Arguments) Validate

func (a *Arguments) Validate() error

Validate implements river.Validator.

Validate validates the arguments. Specifically, it checks that a BearerToken or BearerTokenFile is specified, as the DigitalOcean API requires a Bearer Token for authentication.

Jump to

Keyboard shortcuts

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