cmd

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

README

Cmd

The Cmd input component executes a specified command and streams its output.


Output Type

  • String

Pkl Configuration

class Cmd extends Input {
  fixed sourceName = "cmd"
  exec: Listing<String>
}

Parameters

Name Type Description Example
exec Listing<String> Command and arguments exec { "/usr/bin/log" "stream --style ndjson" }

Description

The Cmd component runs the specified command with its arguments in a subprocess. The output of the command is then streamed as input for the pipeline.

Example Configuration
new Cmd {
  name = "cmd-example"
  exec = { "/usr/bin/log" "stream --style ndjson" }
}
Use Case
  • Capturing system logs and processing them in real-time.
  • Integrating external tools or scripts into your pipeline.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	components.Logger
	// contains filtered or unexported fields
}

func (*Cmd) Generate

func (c *Cmd) Generate(ctx context.Context, input chan<- any)

func (*Cmd) Init

func (c *Cmd) Init(cfg input.Input) error

Jump to

Keyboard shortcuts

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