config

package
v1.30.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 10 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 {
	AlgorithmType         hcloud.LoadBalancerAlgorithmType
	DisablePublicNetwork  *bool
	Enabled               bool
	HealthCheckInterval   time.Duration
	HealthCheckRetries    int
	HealthCheckTimeout    time.Duration
	IPv6Enabled           bool
	Location              string
	NetworkZone           string
	PrivateIngressEnabled bool
	PrivateIPEnabled      bool
	PrivateSubnetIPRange  string
	ProxyProtocolEnabled  *bool
	Type                  string
}

type MetricsConfiguration

type MetricsConfiguration struct {
	Enabled bool
	Address string
}

type NetworkConfiguration

type NetworkConfiguration struct {
	NameOrID             string
	AttachedCheckEnabled bool
}

type RobotConfiguration

type RobotConfiguration struct {
	Enabled           bool
	User              string
	Password          string // #nosec G117 -- This config is never json marshaled
	CacheTimeout      time.Duration
	RateLimitWaitTime time.Duration
	// ForwardInternalIPs is enabled by default.
	ForwardInternalIPs bool
}

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