servicelogs

package
v0.0.0-...-bef5c4b Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dimension

type Dimension = Tuple

type Logger

type Logger interface {
	io.Closer
	Log(op Operation, opStart time.Time, props []Property, dims []Dimension, metrics []Metric)
}

type Metric

type Metric struct {
	Type  MetricType
	Key   string
	Value float64
	Dims  []Dimension
}

func Counter

func Counter(name string, value float64, dims ...Dimension) Metric

func Timer

func Timer(name string, duration time.Duration, dims ...Dimension) Metric

type MetricType

type MetricType uint8
const (
	CounterType MetricType = iota
	TimerType
)

type MockLogger

type MockLogger struct {
	mock.Mock
}

func NewMockLogger

func NewMockLogger(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockLogger

func (*MockLogger) Close

func (_m *MockLogger) Close() error

func (*MockLogger) Log

func (_m *MockLogger) Log(op Operation, opStart time.Time, props []Tuple, dims []Tuple, metrics []Metric)

type Operation

type Operation string
const (
	InitOp          Operation = "Init"
	InvokeOp        Operation = "Invoke"
	ShutdownOp      Operation = "Shutdown"
	ReserveOp       Operation = "Reserve"
	ReconnectOp     Operation = "Reconnect"
	InvokePendingOp Operation = "InvokePending"
)

type Property

type Property = Tuple

type Tuple

type Tuple struct {
	Name  string
	Value string
}

Jump to

Keyboard shortcuts

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