stream

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SPIN_NUM_TRIES = 3
	SPIN_THRESHOLD = 1 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	util.Lifetime
	deadlock.RWMutex
	// contains filtered or unexported fields
}

func NewCmd

func NewCmd(ctx context.Context, options CmdOptions, size Size) (*Cmd, error)

func (*Cmd) Kill added in v0.2.0

func (c *Cmd) Kill()

func (*Cmd) Options added in v0.8.1

func (c *Cmd) Options() CmdOptions

Options returns the original arguments used to start the command.

func (*Cmd) Path

func (c *Cmd) Path() (string, error)

func (*Cmd) Read

func (c *Cmd) Read(p []byte) (n int, err error)

func (*Cmd) Resize

func (c *Cmd) Resize(size Size) error

func (*Cmd) Write

func (c *Cmd) Write(data []byte) (n int, err error)

type CmdOptions

type CmdOptions struct {
	Directory string
	Command   string
	Args      []string
	Restart   bool
	Env       map[string]string
}

type CmdStatus

type CmdStatus int
const (
	CmdStatusStarting CmdStatus = iota
	CmdStatusHealthy
	CmdStatusFailed
	CmdStatusComplete
	CmdStatusKilled
)

type Notifier

type Notifier = mux.Updater

type Reader

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

func NewReader

func NewReader() *Reader

func (*Reader) Kill added in v0.2.0

func (s *Reader) Kill()

func (*Reader) Read

func (s *Reader) Read(p []byte) (n int, err error)

func (*Reader) Resize

func (s *Reader) Resize(size Size) error

Resizing does nothing to a stream.

func (*Reader) Write

func (s *Reader) Write(data []byte) (n int, err error)

func (*Reader) Writer

func (s *Reader) Writer() io.Writer

Return the handle that allows you to write to this stream.

type Screen

type Screen = mux.Screen

type Size

type Size = mux.Size

type Stream

type Stream = mux.Stream

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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