fields

package
v2.16.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright (c) Edgeless Systems GmbH

SPDX-License-Identifier: AGPL-3.0-only

Index

Constants

This section is empty.

Variables

View Source
var (
	// DebugdLogcollectPrefix is the prefix for all OpenSearch fields specified by the user when starting through debugd.
	DebugdLogcollectPrefix = "logcollect."
	// AllowedFields are the fields that are allowed to be used in the logcollection.
	AllowedFields = map[string]struct{}{
		"admin":            {},
		"is_debug_cluster": {},

		"github.actor":            {},
		"github.workflow":         {},
		"github.run-id":           {},
		"github.run-attempt":      {},
		"github.ref-name":         {},
		"github.sha":              {},
		"github.runner-os":        {},
		"github.e2e-test-payload": {},
		"github.is-debug-cluster": {},

		"github.e2e-test-provider": {},
		"deployment-type":          {},
	}
)

Functions

This section is empty.

Types

type Fields

type Fields map[string]string

Fields are the OpenSearch fields that are associated with a log message.

func FromMap

func FromMap(m map[string]string) Fields

FromMap returns new Fields from the given map.

func (Fields) Check

func (f Fields) Check() error

Check checks whether all the fields in f are allowed. For fields that are prefixed with the debugd logcollect prefix are only the subkeys are checked.

func (Fields) Extend

func (f Fields) Extend(other Fields) Fields

Extend adds the fields from other to f and returns the result.

Jump to

Keyboard shortcuts

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