internal

package
v0.16.7 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtrlCReader

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

CtrlCReader implements a simple Reader/Closer that returns Ctrl-C and EOF on Read() after it has been closed, and nothing before it.

func NewCtrlCReader

func NewCtrlCReader(ctx context.Context) *CtrlCReader

NewCtrlCReader returns a new CtrlCReader instance

func (*CtrlCReader) Close

func (cc *CtrlCReader) Close() error

Close implements io.Closer. Note that we do not return an error on second close, not do we wait for the close to have any effect.

func (*CtrlCReader) Read

func (cc *CtrlCReader) Read(p []byte) (n int, err error)

Read implements io.Reader. Blocks until we are done.

Jump to

Keyboard shortcuts

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