metric

package
v0.4.22 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "common.metric"

Variables

This section is empty.

Functions

func App

func App(app string) zap.Field

func Cid

func Cid(cid string) zap.Field

func FileId

func FileId(fileId string) zap.Field

func Identity

func Identity(val string) zap.Field

func Method

func Method(val string) zap.Field

func ObjectId

func ObjectId(val string) zap.Field

func PeerId

func PeerId(val string) zap.Field

func PeerVersion added in v0.2.2

func PeerVersion(val string) zap.Field

func QueueDur

func QueueDur(val time.Duration) zap.Field

func Size

func Size(size int) zap.Field

func SpaceId

func SpaceId(val string) zap.Field

func TotalDur

func TotalDur(val time.Duration) zap.Field

Types

type Config

type Config struct {
	Addr string `yaml:"addr"`
}

type Metric

type Metric interface {
	Registry() *prometheus.Registry
	WrapDRPCHandler(h drpc.Handler) drpc.Handler
	RequestLog(ctx context.Context, rpc string, fields ...zap.Field)
	app.ComponentRunnable
}

func New

func New() Metric

Jump to

Keyboard shortcuts

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