stream

package
v0.0.0-...-211e212 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogStream

func NewLogStream(ctx context.Context, renderer Renderer, ops ...LogStreamOption)

Types

type Display

type Display struct {
	Header   io.Writer
	Contents io.Writer
	Footer   io.Writer
}

type LogStreamOption

type LogStreamOption func(*LogStreamOptions)

func WithConsole

func WithConsole(c console.Console) LogStreamOption

func WithDelay

func WithDelay(delay time.Duration) LogStreamOption

func WithMaxHeight

func WithMaxHeight(height int) LogStreamOption

type LogStreamOptions

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

func (*LogStreamOptions) Apply

func (o *LogStreamOptions) Apply(opts ...LogStreamOption)

type Renderer

type Renderer func(console.Console, Display)

type RingLineBuffer

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

func NewRingLineBuffer

func NewRingLineBuffer(max int) *RingLineBuffer

func (*RingLineBuffer) Foreach

func (wb *RingLineBuffer) Foreach(f func(i int, line []byte))

func (*RingLineBuffer) LineCount

func (wb *RingLineBuffer) LineCount() int

func (*RingLineBuffer) MaxLines

func (wb *RingLineBuffer) MaxLines() int

func (*RingLineBuffer) Write

func (wb *RingLineBuffer) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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