stitch

package module
v0.0.0-...-949e02b Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stitch

func Stitch(ctx context.Context, rwca, rwcb io.ReadWriteCloser) error

Stitch stitches two io.ReadWriter implementations together, forwarding reads and writes between them.

Types

type CtxReadWriter

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

CtxReadWriter is an io.ReadWriter implementation that respects the context.

func (*CtxReadWriter) Read

func (crw *CtxReadWriter) Read(b []byte) (n int, err error)

Read reads from the readwriter onto the given buffer.

func (*CtxReadWriter) Write

func (crw *CtxReadWriter) Write(b []byte) (n int, err error)

Write writes bytes from the given buffer onto the readwriter.

Directories

Path Synopsis
__examples__

Jump to

Keyboard shortcuts

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