stream

package
v15.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BandStdout = 1
	BandStderr = 2
)

BandStdout and BandStderr are the pktline band ID's for stdout and stderr, respectively.

Variables

This section is empty.

Functions

func Handler

func Handler(recv func() (StdoutStderrResponse, error), send func(chan error), stdout, stderr io.Writer) (int32, error)

Handler takes care of sending and receiving to and from the stream

func ProxyPktLine

func ProxyPktLine(c Conn, stdin io.Reader, stdout, stderr io.Writer) error

ProxyPktLine lets a client de-multiplex and proxy stdin, stdout and stderr streams. Stdout and stderr are interleaved with Git's pktline format.

Types

type Conn

type Conn interface {
	io.Reader
	io.Writer
	CloseWrite() error
}

Conn represents a bi-directional client side connection.

type Sender

type Sender func(chan error)

Sender is a function that sends input data to the stream

type StdoutStderrResponse

type StdoutStderrResponse interface {
	GetExitStatus() *gitalypb.ExitStatus
	GetStderr() []byte
	GetStdout() []byte
}

StdoutStderrResponse is an interface for RPC responses that need to stream stderr and stdout

Jump to

Keyboard shortcuts

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