servicelogs

package
v0.0.0-...-4fa2157 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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"
)

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