config

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ImUpAPIHost = "https://api.imup.io"

NOTE: ImUpAPIHost is set via build flags

Functions

This section is empty.

Types

type Reloadable

type Reloadable interface {
	APIKey() string
	EmailAddress() string
	GroupID() string
	HostID() string
	PublicIP() string
	RefreshPublicIP() string
	Version() string

	Realtime() bool
	SpeedTests() bool
	StoreJobsOnDisk() bool
	InsecureSpeedTests() bool
	PingTests() bool

	EnableRealtime()
	DisableRealtime()

	Verbosity() log.Level

	AllowedIPs() []string
	BlockedIPs() []string

	PostConnectionData() string
	PostSpeedTestData() string
	LivenessCheckInURL() string
	ShouldRunSpeedTestURL() string
	SpeedTestResultsURL() string
	SpeedTestStatusUpdateURL() string
	RealtimeAuth() string
	RealtimeConfigURL() string
	PingAddresses() []string
	InternalPingAddress() string
	PingIntervalSeconds() int
	ConnIntervalSeconds() int
	PingDelayMilli() int
	ConnDelayMilli() int
	PingRequestsCount() int
	ConnRequestsCount() int
	IMUPDataLen() int
}

Reloadable is the interface to a remote configuration this interface exposes read and write, thread safe methods allowing it to be accessed and written to concurrently

func New

func New() (Reloadable, error)

New returns a freshly setup Reloadable config.

func Reload

func Reload(data []byte) (Reloadable, error)

Reload expects a payload that is compatible with a base reloadable config and will update the underlying global configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳