metrics

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 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"
)

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
}

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