exec

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package exec provides a data source implementation that can execute external commands and return its standard output for import or importstr use.

Index

Constants

View Source
const (
	Scheme = "exec"
)

Scheme is scheme supported by this data source

Variables

This section is empty.

Functions

func New

func New(name string, configVar string) api.DataSource

New creates a new exec data source

Types

type Config

type Config struct {
	Command string            `json:"command"`           // the executable that is run
	Args    []string          `json:"args,omitempty"`    // arguments to be passed to the command
	Env     map[string]string `json:"env,omitempty"`     // environment for the command
	Stdin   string            `json:"stdin,omitempty"`   // standard input to pass to the command
	Timeout string            `json:"timeout,omitempty"` // command timeout as a duration string
	// contains filtered or unexported fields
}

Config is the configuration of the data source.

Jump to

Keyboard shortcuts

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