micrometer

package module
v0.0.0-...-0c61dd4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README ΒΆ

Welcome to micrometer-go πŸ‘‹

Documentation

a micrometer implementation in Golang.

🏠 Homepage

Install

$ go get -u github.com/jjeffcaii/micrometer-go

Author

πŸ‘€ Jeffsky

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❀️ by readme-md-generator

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

This section is empty.

Types ΒΆ

type Counter ΒΆ

type Counter interface {
	Meter
	Increment(amount float64)
	Count() float64
}

func NewCounter ΒΆ

func NewCounter(id *ID) Counter

type CounterBuilder ΒΆ

type CounterBuilder struct {
	// contains filtered or unexported fields
}

func (*CounterBuilder) Description ΒΆ

func (p *CounterBuilder) Description(desc string) *CounterBuilder

func (*CounterBuilder) Register ΒΆ

func (p *CounterBuilder) Register(registry MeterRegistry) (Counter, error)

func (*CounterBuilder) Tag ΒΆ

func (p *CounterBuilder) Tag(k, v string) *CounterBuilder

func (*CounterBuilder) Tags ΒΆ

func (p *CounterBuilder) Tags(tags ...string) *CounterBuilder

func (*CounterBuilder) Unit ΒΆ

func (p *CounterBuilder) Unit(unit string) *CounterBuilder

type ID ΒΆ

type ID struct {
	Name string
	Tags []*Tag
	Type Type
	Unit string
	Desc string
}

type Measurement ΒΆ

type Measurement interface {
	Statistic() Statistic
	Value() float64
}

type Meter ΒΆ

type Meter interface {
	ID() *ID
	Measure() []Measurement
}

type MeterBuilder ΒΆ

type MeterBuilder struct {
}

func Builder ΒΆ

func Builder() MeterBuilder

func (MeterBuilder) Counter ΒΆ

func (b MeterBuilder) Counter(name string) *CounterBuilder

type MeterRegistry ΒΆ

type MeterRegistry interface {
	Counter(id *ID) (Counter, error)
}

func NewSimpleMeterRegistry ΒΆ

func NewSimpleMeterRegistry() MeterRegistry

type Statistic ΒΆ

type Statistic int8
const (
	StatisticUnknown Statistic = iota
	StatisticTotal
	StatisticTotalTime
	StatisticCount
	StatisticMax
	StatisticValue
	StatisticActiveTasks
	StatisticDuration
)

func (Statistic) String ΒΆ

func (s Statistic) String() string

type Summary ΒΆ

type Summary interface {
	Meter
	Record(v float64)
	Count() int64
	Amount() float64
	Mean() float64
	Max() float64
}

type Tag ΒΆ

type Tag struct {
	K string
	V string
}

type Type ΒΆ

type Type int8
const (
	TypeCounter Type
	TypeGauge
	TypeLongTaskTimer
	TypeTimer
	TypeDistributionSummary
	TypeOther
)

Jump to

Keyboard shortcuts

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