monitor

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppMessageRunningPeriod = "period"
	AppMessageRunningTime   = "time"
)

Variables

This section is empty.

Functions

func CheckRetryableError

func CheckRetryableError(err error) bool

func ReportToMonitor

func ReportToMonitor(ctx context.Context, asset, amount, trace string, receivers []string, threshold int, msg *AppMessage, u *bot.SafeUser) (*bot.SequencerTransactionRequest, error)

Types

type AppMessage

type AppMessage struct {
	Project string         `yaml:"project"`
	Running string         `yaml:"running"`
	Status  int            `yaml:"status"`
	Data    []*MessageData `yaml:"data"`
}

func UnmarshalAppMessage

func UnmarshalAppMessage(b []byte) (*AppMessage, error)

func (*AppMessage) Marshal

func (m *AppMessage) Marshal() ([]byte, error)

type MessageData

type MessageData struct {
	Name  string `yaml:"name" json:"name"`
	Value string `yaml:"value" json:"value"`
	Score int    `yaml:"score" json:"score"`
}

Jump to

Keyboard shortcuts

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