event

package
v0.0.0-...-3f5e15c Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockMissedTracker

func BlockMissedTracker(moniker, network string, missed int)

BlockMissedTracker check missed blocks in a row

func CatchingUpState

func CatchingUpState(sCU, rCU bool, moniker, network string, diff, maxDiff int64)

CatchingUpState check cachingUp state , alert if true

func Difference

func Difference(one, two, min int64, ctx Context) (string, bool)

Difference diff two values , comparing with minimal difference and return increase/decrease message for alert

func HealthCheck

func HealthCheck(moniker, network, rpc string, counter int,
	timeDelta time.Duration, lastSeenAt time.Time, lastStatus bool) (bool, bool)

HealthCheck check node health

func PeersCount

func PeersCount(sPC, rPC int, moniker, network string)

PeersCount check for peers count, alert if changed

func Unknown

func Unknown(s string) string

replace nil string with "UNKNOWN"

func VotingPower

func VotingPower(sVP, rVP, sVPC int64, moniker, network string)

VotingPower comparing voting power of validator , if changed - send alert

Types

type Context

type Context struct {
	VotingPower bool
	PeersCount  bool
}

type Event

type Event struct {
	Moniker string
	Status  Status
}

func New

func New() *Event

type Status

type Status conf.NodeStatus

Jump to

Keyboard shortcuts

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