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
Click to show internal directories.
Click to hide internal directories.