exec

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallWithTty

func CallWithTty(callTty *os.File, fn Callback) (err error)

CallWithTty will wrap the given *os.File with new pty/tty instances and call the fn Callback with the appropriate input and output *os.File handles

func Command

func Command(callTty *os.File, name string, argv ...string) (err error)

func CopyIoWithCancel

func CopyIoWithCancel(tag string, src io.ReadWriter, dst io.Writer) (cancel context.CancelFunc, err error)

func CopyWithCancel

func CopyWithCancel(tag string, src, dst *os.File) (cancel context.CancelFunc, err error)

func Go

func Go(fn func())

func GoWithLocalContext

func GoWithLocalContext(data interface{}, fn func())

func GoWithMainContext

func GoWithMainContext(data interface{}, fn func())

func IsLocalContextValid

func IsLocalContextValid() (valid bool)

Types

type CLocalContext

type CLocalContext struct {
	Data interface{}
}

func GetLocalContext

func GetLocalContext() (ac *CLocalContext, err error)

type Callback

type Callback = func(in, out *os.File) (err error)

type SpawnCallback

type SpawnCallback = func() (err error)

type SpawnResize

type SpawnResize = func(w, h uint32) (err error)

func Spawn

func Spawn(device io.ReadWriter, startup Callback, shutdown SpawnCallback) (cancel context.CancelFunc, resize SpawnResize, wg *sync.WaitGroup, err error)

Jump to

Keyboard shortcuts

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