promtail

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const LOG_ENTRIES_CHAN_SIZE = 5000

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchMap

type BatchMap map[uint64]*EntryBatch

func NewBatchMap

func NewBatchMap() BatchMap

func (BatchMap) Append

func (b BatchMap) Append(labels LabelSet, entry *logproto.Entry) *BatchMap

type Client

type Client interface {
	Log(Line string, level LogLevel, extraLabels LabelSet)
	Shutdown()
	Sent() int
	Buffered() int
}

func NewClientProto

func NewClientProto(conf ClientConfig, parent *http.Client) (Client, error)

type ClientConfig

type ClientConfig struct {
	// E.g. http://localhost:3100/api/prom/push
	PushURL string
	// E.g. "{job=\"somejob\"}"
	Labels             LabelSet
	BatchWait          time.Duration
	BatchEntriesNumber int
}

type EntryBatch

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

func NewEntryBatch

func NewEntryBatch(labels LabelSet) *EntryBatch

func (EntryBatch) Append

func (b EntryBatch) Append(entry *logproto.Entry) *EntryBatch

type LabelSet

type LabelSet map[string]string

func (LabelSet) Append

func (ls LabelSet) Append(label string, value string) LabelSet

func (LabelSet) Copy

func (ls LabelSet) Copy() LabelSet

func (LabelSet) Fingerprint

func (ls LabelSet) Fingerprint() uint64

func (LabelSet) String

func (ls LabelSet) String() string

func (LabelSet) WithExtras

func (ls LabelSet) WithExtras(extra LabelSet) LabelSet

type LogLevel

type LogLevel int
const (
	CRITICAL LogLevel = 2
	ERROR    LogLevel = 3
	WARNING  LogLevel = 4
	NOTICE   LogLevel = 5
	INFO     LogLevel = 6
	DEBUG    LogLevel = 7
)

Jump to

Keyboard shortcuts

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