infra

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSystem = &System{}

Functions

func Exists

func Exists(path string) bool

func IsDirectory

func IsDirectory(path string) bool

Types

type FileToWatch

type FileToWatch interface {
	Path() string
	OnChange()
}

type FileWatcher

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

func NewFileWatcher

func NewFileWatcher() (fw *FileWatcher)

func (*FileWatcher) Add

func (cw *FileWatcher) Add(file FileToWatch)

func (*FileWatcher) Close

func (cw *FileWatcher) Close() (err error)

func (*FileWatcher) Serve

func (cw *FileWatcher) Serve(ctx context.Context)

type Pseudo

type Pseudo interface {
	io.ReadWriteCloser
	Resize(cols, rows int) error
	Pid() int
}

func StartPty

func StartPty(ctx context.Context, rows, cols int, cmd string, args ...string) (Pseudo, error)

type System

type System struct{}

func (*System) Version

func (handler *System) Version() (major, minor, build uint32)

type UnixPseudo

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

func (UnixPseudo) Close

func (up UnixPseudo) Close() (err error)

func (UnixPseudo) Pid

func (up UnixPseudo) Pid() int

func (UnixPseudo) Read

func (up UnixPseudo) Read(recv []byte) (n int, err error)

func (UnixPseudo) Resize

func (up UnixPseudo) Resize(cols, rows int) error

func (UnixPseudo) Write

func (up UnixPseudo) Write(data []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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