stream

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2018 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PipeStdin

func PipeStdin(stream StdinStreamClient, stdin io.Reader) error

PipeStdin reads input from Stdin and writes it to the grpc stream

func PipeStdout

func PipeStdout(stream StdoutStreamClient, stdout, stderr io.Writer) error

PipeStdout reads stdout from grpc stream and writes it to stdout/stderr

Types

type EmptyStdin

type EmptyStdin struct{}

EmptyStdin is io.Read implementation what is empty, i.e. first read return EOF

func (*EmptyStdin) Read

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

type Reader

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

Reader is io.Reader implementation what reads bytes from RPC stream

func NewReader

func NewReader(stream StdinStreamServer) *Reader

NewReader creates new Reader instance

func (*Reader) Read

func (w *Reader) Read(p []byte) (n int, err error)

Write writes bytes to given RPC stream

type StdinStreamClient

type StdinStreamClient interface {
	Send(*containers.StdinStreamRequest) error
}

StdinStreamClient interface for the client what sends stdin stream messages

type StdinStreamServer

type StdinStreamServer interface {
	Recv() (*containers.StdinStreamRequest, error)
}

StdinStreamServer interface for the endpoint what takes stdin stream in

type StdoutStreamClient

type StdoutStreamClient interface {
	Recv() (*containers.StdoutStreamResponse, error)
	CloseSend() error
}

StdoutStreamClient interface for the client what reads stream of log lines

type StdoutStreamServer

type StdoutStreamServer interface {
	Send(*containers.StdoutStreamResponse) error
}

StdoutStreamServer interface for the endpoint what returns stream of log lines

type Writer

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

Writer is io.Writer implementation what writes stdout/stderr bytes to RPC stream

func NewWriter

func NewWriter(stream StdoutStreamServer, stderr bool) *Writer

NewWriter creates new Writer instance

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

Write writes bytes to given RPC stream

Jump to

Keyboard shortcuts

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