misc

package
v0.3.11-8 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 32 Imported by: 3

Documentation

Index

Constants

View Source
const (
	ALERT_METRIC_DATABASE            = "monitor"
	ALERT_RECORD_HISTORY_MEASUREMENT = "alert_record_history"
)
View Source
const (
	SYSTEM_METRIC_DATABASE = "system"

	METIRCY_TYPE_HTTP_REQUST = "http_request"
	METIRCY_TYPE_WORKER      = "worker"
	METIRCY_TYPE_DB_STATS    = "db_stats"
	METIRCY_TYPE_PROCESS     = "process"
)

Variables

This section is empty.

Functions

func AlertHistoryReport

func AlertHistoryReport(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func CollectServiceMetrics

func CollectServiceMetrics(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func Ping

func Ping(addrList []string, probeCount, timeoutSecond int, debug bool) (map[string]*SPingResult, error)

func PingProbe

func PingProbe(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func UsegReport

func UsegReport(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

Types

type SPingResult

type SPingResult struct {
	// contains filtered or unexported fields
}

func NewPingResult

func NewPingResult(addr string, count int) *SPingResult

func (*SPingResult) Add

func (pr *SPingResult) Add(rtt time.Duration)

func (SPingResult) Loss

func (pr SPingResult) Loss() int

func (SPingResult) Rtt

func (pr SPingResult) Rtt() (min time.Duration, avg time.Duration, max time.Duration)

func (SPingResult) String

func (pr SPingResult) String() string

Jump to

Keyboard shortcuts

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