config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTTL     = 60
	DefaultPort    = "53"
	ServicePrefix  = "service:"
	DefaultTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

func GetDNSPort

func GetDNSPort() string

func GetServiceName

func GetServiceName(value string) string

GetServiceName extracts service name from value

func Initialize added in v1.2.0

func Initialize()

func IsServiceRecord

func IsServiceRecord(value string) bool

IsServiceRecord checks if the value represents a Docker service

Types

type RelayConfig added in v1.1.0

type RelayConfig struct {
	Enabled     bool
	Nameservers []string
	Timeout     time.Duration
}

func GetRelayConfig added in v1.1.0

func GetRelayConfig() RelayConfig

GetRelayConfig returns relay configuration based on environment variables. It reads DNS_RELAY_SERVERS for comma-separated upstream nameserver addresses and applies default timeout settings.

Jump to

Keyboard shortcuts

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