cmd

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	// contains filtered or unexported fields
}

Cmd is the command struct that will be executed after recive the order from the input plugins

func NewOrGet

func NewOrGet(r *reactor.Reactor, c map[string]interface{}) (*Cmd, error)

NewOrGet create the command struct and fill the parameters needed from the config data.

func (*Cmd) Exit

func (o *Cmd) Exit()

Exit will finish the command // TODO

func (*Cmd) MatchConditions

func (o *Cmd) MatchConditions(msg lib.Msg) error

MatchConditions is a filter to replace the variables (usually commands arguments) that are coming from the Input message

func (*Cmd) Run

func (o *Cmd) Run(parentCtx context.Context, rl reactorlog.ReactorLog, msg lib.Msg) error

Run will execute the binary command that was defined in the config. In this function we also define the OUT and ERR data destination of the command.

Jump to

Keyboard shortcuts

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