metrics

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndicatorManager

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

func GetIndicatorManager

func GetIndicatorManager() *IndicatorManager

func NewIndicatorManager

func NewIndicatorManager() *IndicatorManager

func (*IndicatorManager) Record

func (m *IndicatorManager) Record(ctx context.Context, platform string, result bool, isMain bool)

func (*IndicatorManager) Summary

func (m *IndicatorManager) Summary(ctx context.Context, platform string) Summary

func (*IndicatorManager) SummaryAll

func (m *IndicatorManager) SummaryAll(ctx context.Context) map[string]Summary

func (*IndicatorManager) WithWindow

func (m *IndicatorManager) WithWindow(window, bucket time.Duration) *IndicatorManager

type Summary

type Summary struct {
	Platform      string    `json:"platform"`
	TotalRequests int64     `json:"totalRequests"`
	TotalErrors   int64     `json:"totalErrors"`
	TotalPercent  float64   `json:"totalPercent"`
	MainRequests  int64     `json:"mainRequests"`
	MainErrors    int64     `json:"mainErrors"`
	MainPercent   float64   `json:"mainPercent"`
	GeneratedAt   time.Time `json:"generatedAt"`
}

Jump to

Keyboard shortcuts

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