copier

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 5 Imported by: 1

README

go-copier

A simple Go utility to asynchronously copy streams.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseReader

type CloseReader interface {
	CloseRead() error
}

type CloseWriter

type CloseWriter interface {
	CloseWrite() error
}

type Copier

type Copier interface {
	CloseReader
	CloseWriter
	GracefulStopper

	Written() int64
	Err() error

	Copy()
}

func New

func New(dst io.Writer, src io.Reader) Copier

type GracefulStopper

type GracefulStopper interface {
	Waiter
	Shutdown(ctx context.Context) error
}

type Group

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

func (*Group) Add

func (g *Group) Add(dst io.Writer, src io.Reader) Copier

func (*Group) AddCopier

func (g *Group) AddCopier(copier Copier) Copier

func (*Group) Shutdown

func (g *Group) Shutdown(ctx context.Context) error

func (*Group) Wait

func (g *Group) Wait(ctx context.Context) error

type Waiter

type Waiter interface {
	Wait(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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