shell

package
v0.0.0-...-03e9b7c Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCat

func NewCat() *cat

func NewInput

func NewInput(in io.ReadCloser) *input

func NewIterativeCmd

func NewIterativeCmd(cmd []string) *iterative

func NewLiveCmd

func NewLiveCmd(cmd []string) *live

func NewMultilineReader

func NewMultilineReader(lines []Line) *multilineReader

func NewSnapshotCmd

func NewSnapshotCmd(cmd []string) *snapshot

Types

type Command

type Command interface {
	Execute(in Input) <-chan Output
	Close()
}

func Exec

func Exec(command string, mode Mode) Command

type Input

type Input interface {
	Listen() (result <-chan []Line, cancelFunc func())
	Close()
}

type Line

type Line []byte

Line represents a single line ending with \n

func NewLines

func NewLines(data []byte) []Line

type Mode

type Mode int
const (
	Snapshot Mode = iota
	Live
	Iterative
)

type Output

type Output struct {
	Stdout []Line
	Stderr []Line
}

Jump to

Keyboard shortcuts

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