offlinenodes

package
v1.111.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chore

type Chore struct {
	Loop *sync2.Cycle
	// contains filtered or unexported fields
}

Chore sends emails to offline nodes.

func NewChore

func NewChore(log *zap.Logger, mail *mailservice.Service, cache *overlay.Service, config Config) *Chore

NewChore creates a new offline nodes Chore.

func (*Chore) Close

func (chore *Chore) Close() error

Close closes chore.

func (*Chore) Run

func (chore *Chore) Run(ctx context.Context) (err error)

Run runs the chore.

type Config

type Config struct {
	Interval  time.Duration `help:"how often to check for offline nodes and send them emails" default:"1h"`
	Cooldown  time.Duration `help:"how long to wait between sending Node Offline emails" default:"24h"`
	MaxEmails int           `help:"max number of offline emails to send a node operator until the node comes back online" default:"3"`
	Limit     int           `` /* 153-byte string literal not displayed */
}

Config contains configurable values for offline nodes chore.

Jump to

Keyboard shortcuts

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