Documentation ¶
Overview ¶
Package config wraps the dnslb and associated plugin packages and creates a DNS load balancer based on configuration data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Block ¶ added in v0.0.5
func Block(config Config, ip string, duration time.Duration, cancelChannel <-chan struct{}, logger log.DebugLogger) error
Block will block a server instance with the specified IP address from adding itself to DNS for the specified time or until a message is received on cancelChannel.
func New ¶
func New(config Config, logger log.DebugLogger) (*dnslb.LoadBalancer, error)
New creates a *dnslb.LoadBalancer using the provided configuration and back-end DNS provider. This will launch a goroutine to perform periodic health checks for the peer servers and to self register.
func RollingReplace ¶ added in v0.0.5
func RollingReplace(config Config, region string, logger log.DebugLogger) error
RollingReplace will use the provided configuration and will roll through all server instances in the specified region triggering replacements by removing each server from DNS, destroying it and waiting for (some other mechanism) to create a working replacement before continuing to the next server.