states

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInitialState

func NewInitialState(forceSendUpdate bool) *initialState

Types

type Client

type Client interface {
	SetState(newState State)
	GetState() State
	GetLastStateChange() time.Time
}

type State

type State interface {
	// EvaluateState evaluates the current state and returns true if the client should proceed sending a change request
	// using the currently detected ip
	EvaluateState(client Client, ip *common.DnsRecord) bool
	// WaitInterval returns the amount of time to sleep after a tick.
	WaitInterval() time.Duration
	Name() string
}

func NewIpConfirmedState

func NewIpConfirmedState(prev *common.DnsRecord) State

func NewIpNotConfirmedState

func NewIpNotConfirmedState() State

Jump to

Keyboard shortcuts

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