common

package
v0.1.8-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelDataCenter     = "dc"
	LabelPurpose        = "purpose"
	LabelContainerID    = "docker.container_id"
	LabelLogstashPrefix = "logstash_prefix"
	LabelLogType        = "type"
	LabelTime           = "time"
)

Pack of constant logstash purposed keys

View Source
const (
	FilenameJournald  = "system.journal"
	NamespaceJournald = "journald"
)

Filename is arbitrary cursorStorage key picked as the standard journal file ending

View Source
const (
	// KubernetesPodName name of field
	KubernetesPodName = "kubernetes.pod_name"

	// KubernetesNamespaceName name of field
	KubernetesNamespaceName = "kubernetes.namespace_name"

	// KubernetesContainerName name of field
	KubernetesContainerName = "kubernetes.container_name"

	// KubernetesNodeHostname name of field
	KubernetesNodeHostname = "kubernetes.node_hostname"
)

common

View Source
const (
	// LabelKubernetesPodNamespace store label name for pod namespace
	LabelKubernetesPodNamespace = "io.kubernetes.pod.namespace"

	// LabelKubernetesPodName store label name of pod
	LabelKubernetesPodName = "io.kubernetes.pod.name"

	// LabelKubernetesContainerName store label name of container
	LabelKubernetesContainerName = "io.kubernetes.container.name"
)

Containers Provider related

View Source
const (
	CRITypeContainerD = "containerd"
	CRITypeDocker     = "docker"
)

Variables

View Source
var ErrInvalidInput = errors.New("not a valid input: map expected")

ErrInvalidInput signals about invalid input to Flatten

Functions

func Flatten

func Flatten(top map[string]interface{}, nested map[string]interface{}) error

Flatten unpacks nested map into top map. Keys in the flat map will be a compound of descending map keys and slice iterations

func MergeChannelsString

func MergeChannelsString(cs ...<-chan string) <-chan string

MergeChannelsString multiplexes string channels into returned channel

Types

type Entry

type Entry struct {
	Origin  []byte
	Format  string
	Extends EntryMap
}

type EntryMap

type EntryMap map[string]interface{}

EntryMap is a shorthand for easier representation of parsed data

func (EntryMap) ContainerName

func (entryMap EntryMap) ContainerName() string

ContainerName attempts to return field from EntryMap

func (EntryMap) Extend

func (entryMap EntryMap) Extend(extends EntryMap)

Extend is a shorthand for extending EntryMapString with keys and values of specified one

func (EntryMap) Filter

func (entryMap EntryMap) Filter(keys ...string) EntryMap

func (EntryMap) NamespaceName

func (entryMap EntryMap) NamespaceName() string

NamespaceName attempts to return field from EntryMap

func (EntryMap) PodName

func (entryMap EntryMap) PodName() string

PodName attempts to return field from EntryMap

Jump to

Keyboard shortcuts

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