config

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Interface               string        `envconfig:"INTERFACE"`
	Hostname                string        `envconfig:"HOSTNAME"`
	User                    string        `envconfig:"USER"`
	Password                string        `envconfig:"PASSWORD"`
	Port                    int           `envconfig:"PORT" default:"1313"`
	KeepAliveInterval       time.Duration `envconfig:"KEEPALIVE_INTERVAL" default:"3s"`
	HealthcheckInterval     time.Duration `envconfig:"HEALTH_CHECK_INTERVAL" default:"5s"`
	HealthcheckTimeout      time.Duration `envconfig:"HEALTH_CHECK_TIMEOUT" default:"5s"`
	ARPGratuitousInterval   time.Duration `envconfig:"ARP_GRATUITOUS_INTERVAL" default:"1s"`
	FailCountBeforeFailover int           `envconfig:"FAIL_COUNT_BEFORE_FAILOVER" default:"3"`
}

func Build

func Build() (Config, error)

func (Config) LeaseTime

func (c Config) LeaseTime() time.Duration

Jump to

Keyboard shortcuts

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