config

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressFamily

type AddressFamily string
const (
	AddressFamilyDualStack AddressFamily = "dualstack"
	AddressFamilyIPv6      AddressFamily = "ipv6"
	AddressFamilyIPv4      AddressFamily = "ipv4"
)

type HCCMConfiguration

type HCCMConfiguration struct {
	HCloudClient HCloudClientConfiguration
	Robot        RobotConfiguration
	Metrics      MetricsConfiguration
	Instance     InstanceConfiguration
	LoadBalancer LoadBalancerConfiguration
	Network      NetworkConfiguration
	Route        RouteConfiguration
}

func Read

func Read() (HCCMConfiguration, error)

Read evaluates all environment variables and returns a HCCMConfiguration. It only validates as far as it needs to parse the values. For business logic validation, check out HCCMConfiguration.Validate.

func (HCCMConfiguration) Validate

func (c HCCMConfiguration) Validate() (err error)

type HCloudClientConfiguration

type HCloudClientConfiguration struct {
	Token    string
	Endpoint string
	Debug    bool
}

type InstanceConfiguration

type InstanceConfiguration struct {
	AddressFamily AddressFamily
}

type LoadBalancerConfiguration

type LoadBalancerConfiguration struct {
	Enabled               bool
	Location              string
	NetworkZone           string
	DisablePrivateIngress bool
	UsePrivateIP          bool
	DisableIPv6           bool
}

type MetricsConfiguration

type MetricsConfiguration struct {
	Enabled bool
	Address string
}

type NetworkConfiguration

type NetworkConfiguration struct {
	NameOrID             string
	DisableAttachedCheck bool
}

type RobotConfiguration

type RobotConfiguration struct {
	Enabled           bool
	User              string
	Password          string
	CacheTimeout      time.Duration
	RateLimitWaitTime time.Duration
}

type RouteConfiguration

type RouteConfiguration struct {
	Enabled bool
}

Jump to

Keyboard shortcuts

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