metrics

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package metrics define interfaces for metrics collection.

Index

Constants

View Source
const (
	ReportModePull = "pull"
	ReportModePush = "push"
)
View Source
const DefMaxAge = 600000000000

Variables

This section is empty.

Functions

This section is empty.

Types

type ReportMode

type ReportMode string

type Reporter

type Reporter interface {
	Report(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation,
		cost time.Duration, res protocol.Result)
}

Reporter is the interface which will be used to report the invocation's duration

Report method reports the duration of an invocation.

type ReporterConfig

type ReporterConfig struct {
	Enable             bool
	Namespace          string
	Mode               ReportMode
	Port               string
	Path               string
	PushGatewayAddress string
	SummaryMaxAge      int64
}

func NewReporterConfig

func NewReporterConfig() *ReporterConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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