msgencoder

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	PrepareBuffer(dst []byte, key string, level log.Level) []byte
	FinalizeBuffer(dst []byte, metricTime time.Time) []byte

	AppendParts(b []byte, bb [][]byte) []byte

	AppendIntField(b []byte, key string, v int64, fmt logfmt.LogFieldFormat) []byte
	AppendUintField(b []byte, key string, v uint64, fmt logfmt.LogFieldFormat) []byte
	AppendBoolField(b []byte, key string, v bool, fmt logfmt.LogFieldFormat) []byte
	AppendFloatField(b []byte, key string, v float64, fmt logfmt.LogFieldFormat) []byte
	AppendComplexField(b []byte, key string, v complex128, fmt logfmt.LogFieldFormat) []byte
	AppendStrField(b []byte, key string, v string, fmt logfmt.LogFieldFormat) []byte
	AppendIntfField(b []byte, key string, v interface{}, fmt logfmt.LogFieldFormat) []byte
	AppendRawJSONField(b []byte, key string, v interface{}, fmt logfmt.LogFieldFormat) []byte
	AppendTimeField(b []byte, key string, v time.Time, fmt logfmt.LogFieldFormat) []byte
}

type EncoderFactory

type EncoderFactory interface {
	CreateEncoder(config logfmt.MsgFormatConfig) Encoder
	CreateMetricWriter(downstream io.Writer, fieldName string, reportFn logcommon.DurationReportFunc) (io.Writer, error)
}

type FactoryDispatcherFunc

type FactoryDispatcherFunc func(string) EncoderFactory

Jump to

Keyboard shortcuts

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