metadatav1

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultColumnWidth = 16
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alignment

type Alignment string
const (
	AlignmenNone   Alignment = ""
	AlignmentLeft  Alignment = "left"
	AlignmentRight Alignment = "right"
)

type EBPFParam

type EBPFParam struct {
	params.ParamDesc `yaml:",inline"`
}

type EllipsisType

type EllipsisType string
const (
	EllipsisNone   EllipsisType = ""
	EllipsisStart  EllipsisType = "start"
	EllipsisMiddle EllipsisType = "middle"
	EllipsisEnd    EllipsisType = "end"
)

type Field

type Field struct {
	// Field name
	Name string `yaml:"name"`
	// Field description
	Description string `yaml:"description,omitempty"`
	// Attributes defines how the field should be formatted
	Attributes FieldAttributes `yaml:"attributes"`
	// Annotations represents extra information that is not relevant to Inspektor Gadget, but
	// for other applications, like color font for instance.
	Annotations map[string]interface{} `yaml:"annotations,omitempty"`
}

type FieldAttributes

type FieldAttributes struct {
	// Width to reserve for this field
	Width uint `yaml:"width,omitempty"`
	// MinWidth is the minimum width for this field
	MinWidth uint `yaml:"minWidth,omitempty"`
	// MaxWidth is the maximum width for this field
	MaxWidth uint `yaml:"maxWidth,omitempty"`
	// Alignment of this column (left or right)
	Alignment Alignment `yaml:"alignment,omitempty"`
	// Hidden defines whether a column is to be hid by default
	Hidden bool `yaml:"hidden,omitempty"`
	// EllipsisType defines how to abbreviate this column if the value needs more space than is
	// available. (start, middle or end)
	Ellipsis EllipsisType `yaml:"ellipsis,omitempty"`
	// Template defines the template that will be used.
	// TODO: add a link to existing templates
	Template string `yaml:"template,omitempty"`
}

FieldAttributes describes how to format a field. It's almost 1:1 mapping with columns.Attributes, however we are keeping this separated because we don't want to create a strong coupling with the columns library now. Later on we can consider merging both of them.

type GadgetMetadata

type GadgetMetadata struct {
	// Gadget name
	Name string `yaml:"name"`
	// Gadget description
	Description string `yaml:"description,omitempty"`
	// HomepageURL is the URL to the gadget's homepage
	HomepageURL string `yaml:"homepageURL,omitempty"`
	// DocumentationURL is the URL to the gadget's documentation
	DocumentationURL string `yaml:"documentationURL,omitempty"`
	// SourceURL is the URL to the gadget's source code repository
	SourceURL string `yaml:"sourceURL,omitempty"`
	// Annotations is a map of key-value pairs that provide additional information about the gadget
	Annotations map[string]string `yaml:"annotations,omitempty"`

	// Tracers implemented by the gadget
	// TODO: Rename this field to something that doesn't collide with the opentelemetry concept
	Tracers map[string]Tracer `yaml:"tracers,omitempty"`
	// Toppers implemented by the gadget
	Toppers map[string]Topper `yaml:"toppers,omitempty"`
	// Snapshotters implemented by the gadget
	Snapshotters map[string]Snapshotter `yaml:"snapshotters,omitempty"`
	// Types generated by the gadget
	Structs map[string]Struct `yaml:"structs,omitempty"`
	// Params exposed by the gadget through eBPF constants
	EBPFParams map[string]EBPFParam `yaml:"ebpfParams,omitempty"`
	// Other params exposed by the gadget
	GadgetParams map[string]params.ParamDesc `yaml:"gadgetParams,omitempty"`
}

type Snapshotter

type Snapshotter struct {
	StructName string `yaml:"structName"`
}

Snapshotter describes the behavior of a gadget that collects the state of a subsystem

type Struct

type Struct struct {
	Fields []Field `yaml:"fields"`
}

Struct describes a type generated by the gadget

type Topper

type Topper struct {
	// Name of the hash map that the gadget uses to send statistics
	MapName string `yaml:"mapName"`
	// Name of the structure generated by this topper
	StructName string `yaml:"structName"`
}

Topper describes the behavior of a gadget that shows the current activity sorted by the highest to the lowest in the resource being observed.

type Tracer

type Tracer struct {
	// Name of the perf event array or ring buffer that the gadget uses to send events
	MapName string `yaml:"mapName"`
	// Name of the structure generated by this tracer
	StructName string `yaml:"structName"`
}

Tracer describes the behavior of a gadget that collects and sends events to user space TODO: We need to rename this concept not to collide with the opentelemetry concept

Jump to

Keyboard shortcuts

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