digitalocean

package
v0.33.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 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,
}

Functions

func New

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

	ProxyURL        config.URL `river:"proxy_url,attr,optional"`
	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) UnmarshalRiver

func (a *Arguments) UnmarshalRiver(f func(interface{}) error) error

func (*Arguments) Validate

func (a *Arguments) Validate() error

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
JackTT - Gopher 🇻🇳