config

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomDurationAround

func RandomDurationAround(duration time.Duration, scatteringPercentage float64) time.Duration

RandomDurationAround returns a duration (1.0 - percent) * duration < n < (1.0 + percent) * duration

Types

type Config

type Config struct {
	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"`
	KeepAliveRetry      int           `envconfig:"KEEPALIVE_RETRY" default:"5"`
	HealthCheckInterval