monitor

package
v3.4.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AppMessageRunningPeriodShort = "p"
	AppMessageRunningTimeShort   = "t"

	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"`
	Status  int            `yaml:"status"`
	Data    []*MessageData `yaml:"data"`
}

Tag: service name Running: period, time Duration: 0m 10m, 30m, 60m project example: 1. rpc-bsc|p|30|rpc 2. rpc-deposit|t|0|rpc

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"`
}

Jump to

Keyboard shortcuts

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