daemon

package
v0.0.0-...-2e0f108 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const CHECK_SUSPENDED_INTERVAL = 1000 * 10 // 10 seconds
View Source
const JITTER = 500 //ms
View Source
const SUSPENSION_MIN_DELTA = 100 // 100 ms
View Source
const WS_PING_INTERVAL = time.Duration(10) * time.Second

Variables

This section is empty.

Functions

func Fetch

func Fetch(envkey, clientNameArg, clientVersionArg string, rollingReload bool, rollingPct uint8, watchThrottle uint32) (string, error)

func FetchMap

func FetchMap(envkey, clientNameArg, clientVersionArg string, rollingReload bool, rollingPct uint8, watchThrottle uint32) (parser.EnvMap, parser.EnvMap, error)

func InlineStart

func InlineStart(shouldCacheArg bool, memCacheArg bool)

func IsAlive

func IsAlive() bool

func LaunchDetachedIfNeeded

func LaunchDetachedIfNeeded(opts DaemonOptions) error

func ListenChange

func ListenChange(props ListenChangeProps)

func ListenChangeWithEnv

func ListenChangeWithEnv(envkey, clientName, clientVersion string, rollingReload bool, rollingPct uint8, watchThrottle uint32, onChange func(parser.EnvMap, parser.EnvMap))

func RemoveListener

func RemoveListener(envkey string)

func Stop

func Stop()

Types

type DaemonOptions

type DaemonOptions struct {
	VerboseOutput bool
	ShouldCache   bool
	MemCache      bool
}

type DaemonResponse

type DaemonResponse struct {
	CurrentEnv  parser.EnvMap
	PreviousEnv parser.EnvMap
}

type EnvkeyMeta

type EnvkeyMeta struct {
	ClientName    string
	ClientVersion string
}

type ListenChangeProps

type ListenChangeProps struct {
	Envkey                 string
	WatchThrottle          uint32
	OnChange               func()
	OnStartRolling         func(batchNum, totalBatches uint16, watchThrottle uint32)
	OnRollingComplete      func()
	OnInvalid              func()
	OnThrottled            func()
	OnLostDaemonConnection func(error)
	OnDaemonConnectFailed  func(error)
	OnWillReconnect        func()
	OnReconnected          func()
	OnReconnectedNoChange  func()
	OnSuspended            func()
	OnSuspendedNoChange    func()
}

type SocketAuth

type SocketAuth struct {
	Type         string `json:"type"`
	EnvkeyIdPart string `json:"envkeyIdPart"`
	ConnectionId string `json:"connectionId"`
}

Jump to

Keyboard shortcuts

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