servicelog

package
v0.11.36 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extend added in v0.10.0

func Extend(in <-chan Entry, extenders ...Extender) <-chan Entry

Extend returns a channel that will return log entries extended with passed extenders list. Original log entries are not modified, but duplicate keys are overwritten in returned ones.

Types

type Entry

type Entry map[string]interface{}

Entry represents one scraped log line in flat key-value store.

type Extender added in v0.10.0

type Extender interface {
	// Extend returns a new log entry, based on the passed one, with additional
	// data. Original entry is not modified but duplicate keys are overwritten in
	// returned entry.
	Extend(Entry) Entry
}

Extender is type used to extend log data with additional data.

type StaticDataExtender added in v0.10.0

type StaticDataExtender struct {
	Data map[string]interface{}
}

StaticDataExtender adds data specified in the Data field to passed log entry.

func (StaticDataExtender) Extend added in v0.10.0

func (e StaticDataExtender) Extend(entry Entry) Entry

Extend returns a new log entry, based on the passed entry, with Data map added to it.

type SystemDataExtender added in v0.10.0

type SystemDataExtender struct {
}

SystemDataExtender adds system specific data to passed log entry. It only adds data that is able to get.

func (SystemDataExtender) Extend added in v0.10.0

func (e SystemDataExtender) Extend(entry Entry) Entry

Extend returns a new log entry, based on the passed entry, with hostname, region and availability zone added to it. Data is added only when it is possible to retrieve it from the system.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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