Help us shape the future of Go! Take the 2026 Go Developer Survey

stats

package
v0.12.13 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0, LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSyncerStats

type ClientSyncerStats interface {
	GetMetric(message.Request) (MessageMetric, error)
}

func NewClientSyncerStats

func NewClientSyncerStats() ClientSyncerStats

NewClientSyncerStats returns stats for the client syncer

func NewNoOpStats

func NewNoOpStats() ClientSyncerStats

func NewStats

func NewStats(enabled bool) ClientSyncerStats

NewStats returns syncer stats if enabled or a no-op version if disabled.

type MessageMetric

type MessageMetric interface {
	IncRequested()
	IncSucceeded()
	IncFailed()
	IncInvalidResponse()
	IncReceived(int64)
	UpdateRequestLatency(time.Duration)
}

func NewMessageMetric

func NewMessageMetric(name string) MessageMetric

Jump to

Keyboard shortcuts

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