stats

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Service

func Service(reporter Reporter) (v service.Service)

Types

type Metric

type Metric struct {
	Service   string        `json:"service" validate:"required" message:"service is required"`
	Fn        string        `json:"fn" validate:"required" message:"fn is required"`
	Succeed   bool          `json:"succeed" validate:"required" message:"succeed is required"`
	ErrorCode int           `json:"errorCode"`
	ErrorName string        `json:"errorName"`
	Latency   time.Duration `json:"latency" validate:"required" message:"latency is required"`
}

type Reporter

type Reporter interface {
	Build(options ReporterOptions) (err error)
	Report(ctx context.Context, metric *Metric) (err error)
	Close()
}

type ReporterOptions

type ReporterOptions struct {
	Log    logs.Logger
	Config configures.Config
}

Jump to

Keyboard shortcuts

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