stream

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 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 {
	deadlock.RWMutex
	// contains filtered or unexported fields
}

func NewCmd

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

func (*Cmd) GetStatus

func (c *Cmd) GetStatus() CmdStatus

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) Subscribe

func (c *Cmd) Subscribe(ctx context.Context) *util.Subscriber[CmdStatus]

func (*Cmd) Write

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

type CmdOptions

type CmdOptions struct {
	Directory string
	Command   string
	Args      []string
}

type CmdStatus

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

type Notifier

type Notifier = mux.Updater

type Reader

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

func NewReader

func NewReader() *Reader

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