config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_FREQUENCY = time.Hour * 1 // default to updating every hour
View Source
const DEFAULT_TIMEOUT = time.Second * 10 // default timeout for HTTP requests
View Source
const DEFAULT_WORKER_COUNT = 10 // default number of concurrent workers
View Source
const MAXIMUM_WORKER_COUNT = 100 // maximum number of concurrent workers
View Source
const MINIMUM_FREQUENCY = time.Minute * 1 // minimum update frequency is 1 minute
View Source
const MINIMUM_TIMEOUT = time.Second * 1 // minimum timeout for HTTP requests
View Source
const MINIMUM_WORKER_COUNT = 1 // minimum number of concurrent workers

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ZoneID      string        `yaml:"zone_id"`      // CloudFlare Zone ID
	Token       string        `yaml:"token"`        // CloudFlare zone-scoped token (read/write)
	Frequency   time.Duration `yaml:"frequency"`    // Frequency at which to update the domains
	Verbose     bool          `yaml:"verbose"`      // Verbose logging output
	IPv4        *bool         `yaml:"ipv4"`         // use IPv4 A records
	IPv6        *bool         `yaml:"ipv6"`         // use IPv6 AAAA records
	Domains     []Domain      `yaml:"domains"`      // List of domain names to update
	WorkerCount int           `yaml:"worker_count"` // Number of concurrent workers
	Timeout     time.Duration `yaml:"timeout"`      // HTTP timeout duration
}

func LoadConfig

func LoadConfig(filename string) (*Config, error)

type Domain

type Domain struct {
	Hostname string `yaml:"hostname"` // FQDN of the domain to update
	Proxied  *bool  `yaml:"proxied"`  // Whether the record is proxied through CloudFlare, nil = leave unchanged
}

Jump to

Keyboard shortcuts

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