streamer

package
v0.0.0-...-b40633b Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyExecID   = errors.New("emtpy exec id")
	ErrTtySizeIsZero = errors.New("tty size is 0")
)

Functions

This section is empty.

Types

type CommonStream

type CommonStream struct {
	Fd         uintptr
	IsTerminal bool
	State      *term.State
}

func (*CommonStream) RestoreTerminal

func (s *CommonStream) RestoreTerminal()

type In

type In struct {
	CommonStream
	// contains filtered or unexported fields
}

func NewIn

func NewIn(in io.ReadCloser) *In

func (*In) Close

func (i *In) Close() error

func (*In) Read

func (i *In) Read(p []byte) (int, error)

func (*In) RestoreTerminal

func (i *In) RestoreTerminal() error

func (*In) SetRawTerminal

func (i *In) SetRawTerminal() (err error)

type Out

type Out struct {
	CommonStream
	// contains filtered or unexported fields
}

func NewOut

func NewOut(out io.Writer) *Out

func (*Out) GetTtySize

func (o *Out) GetTtySize() (uint, uint)

func (*Out) Write

func (o *Out) Write(p []byte) (int, error)

type ResizeContainer

type ResizeContainer func(ctx context.Context, id string, options types.ResizeOptions) error

type Streamer

type Streamer struct {
	In  *In
	Out *Out
	Err io.Writer
	// contains filtered or unexported fields
}

func New

func New() *Streamer

func (*Streamer) SetRawTerminal

func (s *Streamer) SetRawTerminal() (func(), error)

func (*Streamer) Stream

func (s *Streamer) Stream(ctx context.Context, id string, resp types.HijackedResponse, resize ResizeContainer) (err error)

Jump to

Keyboard shortcuts

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