metrics

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SegmentWriteKey = "aTXiSVqhrmavVNbF2M61pyBDF4stWHgf"
)

Variables

This section is empty.

Functions

func CatchInterrupt

func CatchInterrupt()

CatchInterrupt catches interrupt signals from Ctrl+C ensures that metrics are sent before KSYNC exits

func GetInterrupt

func GetInterrupt() bool

func GetSyncDuration

func GetSyncDuration() time.Duration

GetSyncDuration gets the sync time duration. We subtract the user confirmation duration since this time was not spent on actually syncing the node

func IncreaseFailedRequests

func IncreaseFailedRequests()

func IncreaseSuccessfulRequests

func IncreaseSuccessfulRequests()

func SendTrack

func SendTrack(errorRuntime error)

func SetCommand

func SetCommand(_command string)

func SetContinuationHeight

func SetContinuationHeight(_continuationHeight int64)

func SetLatestHeight

func SetLatestHeight(_latestHeight int64)

func SetSnapshotHeight

func SetSnapshotHeight(_snapshotHeight int64)

func SetSourceId

func SetSourceId(_sourceId string)

func SetUserConfirmationDuration

func SetUserConfirmationDuration(_userConfirmationDuration time.Duration)

func SetUserConfirmationInput

func SetUserConfirmationInput(_userConfirmationInput string)

func WaitForInterrupt

func WaitForInterrupt()

WaitForInterrupt waits indefinitely until KSYNC gets exited in CatchInterrupt after the metrics have been sent. We wait or else KSYNC may exit before the metrics have been properly send

Types

This section is empty.

Jump to

Keyboard shortcuts

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