exec

package
v1.15.1 Latest Latest
Warning

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

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

README

Exec Lookup Plugin

The exec lookup executes configured command with args and stores the result as lookup data. This plugin requires parser and only first parsed event will be used.

Configuration

[[lookups]]
  [lookups.exec]
    alias = "token.renew"

    # command to execute
    command = "kubectl"

    # command args, strings list
    args = []

    # exec timeout
    timeout = "10s"

    # lookup update interval
    # if zero, plugin executes command only on pipeline startup
    interval = "30s"

    [lookups.file.parser]
      type = "json"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exec

type Exec struct {
	*core.BaseLookup `mapstructure:"-"`
	Command          string            `mapstructure:"command"`
	Timeout          time.Duration     `mapstructure:"timeout"`
	Args             []string          `mapstructure:"args"`
	Envs             map[string]string `mapstructure:"envs"`
	// contains filtered or unexported fields
}

func (*Exec) Close

func (l *Exec) Close() error

func (*Exec) Init

func (l *Exec) Init() error

func (*Exec) SetParser

func (l *Exec) SetParser(p core.Parser)

func (*Exec) Update

func (l *Exec) Update() (any, error)

Jump to

Keyboard shortcuts

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