digitalocean

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 9 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

This section is empty.

Types

type Arguments

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

	BearerToken     alloytypes.Secret `alloy:"bearer_token,attr,optional"`
	BearerTokenFile string            `alloy:"bearer_token_file,attr,optional"`

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

func (Arguments) Convert

func (a Arguments) Convert() discovery.DiscovererConfig

func (*Arguments) SetToDefault

func (a *Arguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

func (*Arguments) Validate

func (a *Arguments) Validate() error

Validate implements syntax.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