tar

package
v0.0.0-...-5012a73 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const HeaderCAP = 10

HeaderCAP is the capacity of the buffered proxy channel

View Source
const HeaderQUE = 16

HeaderQUE is the allocated size of the circular queue

View Source
const ReaderCAP = 10

ReaderCAP is the capacity of the buffered proxy channel

View Source
const ReaderQUE = 16

ReaderQUE is the allocated size of the circular queue

View Source
const WriterCAP = 10

WriterCAP is the capacity of the buffered proxy channel

View Source
const WriterQUE = 16

WriterQUE is the allocated size of the circular queue

Variables

This section is empty.

Functions

func ChanHeader

func ChanHeader(inp ...*tar.Header) (out <-chan *tar.Header)

ChanHeader returns a channel to receive all inputs before close.

func ChanHeaderFuncErr

func ChanHeaderFuncErr(act func() (*tar.Header, error)) (out <-chan *tar.Header)

ChanHeaderFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanHeaderFuncNil

func ChanHeaderFuncNil(act func() *tar.Header) (out <-chan *tar.Header)

ChanHeaderFuncNil returns a channel to receive all results of act until nil before close.

func ChanHeaderFuncNok

func ChanHeaderFuncNok(act func() (*tar.Header, bool)) (out <-chan *tar.Header)

ChanHeaderFuncNok returns a channel to receive all results of act until nok before close.

func ChanHeaderSlice

func ChanHeaderSlice(inp ...[]*tar.Header) (out <-chan *tar.Header)

ChanHeaderSlice returns a channel to receive all inputs before close.

func ChanReader

func ChanReader(inp ...*tar.Reader) (out <-chan *tar.Reader)

ChanReader returns a channel to receive all inputs before close.

func ChanReaderFuncErr

func ChanReaderFuncErr(act func() (*tar.Reader, error)) (out <-chan *tar.Reader)

ChanReaderFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanReaderFuncNil

func ChanReaderFuncNil(act func() *tar.Reader) (out <-chan *tar.Reader)

ChanReaderFuncNil returns a channel to receive all results of act until nil before close.

func ChanReaderFuncNok

func ChanReaderFuncNok(act func() (*tar.Reader, bool)) (out <-chan *tar.Reader)

ChanReaderFuncNok returns a channel to receive all results of act until nok before close.

func ChanReaderSlice

func ChanReaderSlice(inp ...[]*tar.Reader) (out <-chan *tar.Reader)

ChanReaderSlice returns a channel to receive all inputs before close.

func ChanWriter

func ChanWriter(inp ...*tar.Writer) (out <-chan *tar.Writer)

ChanWriter returns a channel to receive all inputs before close.

func ChanWriterFuncErr

func ChanWriterFuncErr(act func() (*tar.Writer, error)) (out <-chan *tar.Writer)

ChanWriterFuncErr returns a channel to receive all results of act until err != nil before close.

func ChanWriterFuncNil

func ChanWriterFuncNil(act func() *tar.Writer) (out <-chan *tar.Writer)

ChanWriterFuncNil returns a channel to receive all results of act until nil before close.

func ChanWriterFuncNok

func ChanWriterFuncNok(act func() (*tar.Writer, bool)) (out <-chan *tar.Writer)

ChanWriterFuncNok returns a channel to receive all results of act until nok before close.

func ChanWriterSlice

func ChanWriterSlice(inp ...[]*tar.Writer) (out <-chan *tar.Writer)

ChanWriterSlice returns a channel to receive all inputs before close.

func DoneHeader

func DoneHeader(inp <-chan *tar.Header) (done <-chan struct{})

DoneHeader returns a channel to receive one signal before close after inp has been drained.

func DoneHeaderFunc

func DoneHeaderFunc(inp <-chan *tar.Header, act func(a *tar.Header)) (out <-chan struct{})

DoneHeaderFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneHeaderSlice

func DoneHeaderSlice(inp <-chan *tar.Header) (done <-chan []*tar.Header)

DoneHeaderSlice returns a channel which will receive a slice of all the Headers received on inp channel before close. Unlike DoneHeader, a full slice is sent once, not just an event.

func DoneReader

func DoneReader(inp <-chan *tar.Reader) (done <-chan struct{})

DoneReader returns a channel to receive one signal before close after inp has been drained.

func DoneReaderFunc

func DoneReaderFunc(inp <-chan *tar.Reader, act func(a *tar.Reader)) (out <-chan struct{})

DoneReaderFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneReaderSlice

func DoneReaderSlice(inp <-chan *tar.Reader) (done <-chan []*tar.Reader)

DoneReaderSlice returns a channel which will receive a slice of all the Readers received on inp channel before close. Unlike DoneReader, a full slice is sent once, not just an event.

func DoneWriter

func DoneWriter(inp <-chan *tar.Writer) (done <-chan struct{})

DoneWriter returns a channel to receive one signal before close after inp has been drained.

func DoneWriterFunc

func DoneWriterFunc(inp <-chan *tar.Writer, act func(a *tar.Writer)) (out <-chan struct{})

DoneWriterFunc returns a channel to receive one signal before close after act has been applied to all inp.

func DoneWriterSlice

func DoneWriterSlice(inp <-chan *tar.Writer) (done <-chan []*tar.Writer)

DoneWriterSlice returns a channel which will receive a slice of all the Writers received on inp channel before close. Unlike DoneWriter, a full slice is sent once, not just an event.

func HeaderDaisy

func HeaderDaisy(inp <-chan *tar.Header, tube HeaderTube) (out <-chan *tar.Header)

HeaderDaisy returns a channel to receive all inp after having passed thru tube.

func HeaderDaisyChain

func HeaderDaisyChain(inp <-chan *tar.Header, tubes ...HeaderTube) (out <-chan *tar.Header)

HeaderDaisyChain returns a channel to receive all inp after having passed thru all tubes.

func JoinHeader

func JoinHeader(out chan<- *tar.Header, inp ...*tar.Header) (done <-chan struct{})

JoinHeader sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinHeaderChan

func JoinHeaderChan(out chan<- *tar.Header, inp <-chan *tar.Header) (done <-chan struct{})

JoinHeaderChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinHeaderSlice

func JoinHeaderSlice(out chan<- *tar.Header, inp ...[]*tar.Header) (done <-chan struct{})

JoinHeaderSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReader

func JoinReader(out chan<- *tar.Reader, inp ...*tar.Reader) (done <-chan struct{})

JoinReader sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReaderChan

func JoinReaderChan(out chan<- *tar.Reader, inp <-chan *tar.Reader) (done <-chan struct{})

JoinReaderChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinReaderSlice

func JoinReaderSlice(out chan<- *tar.Reader, inp ...[]*tar.Reader) (done <-chan struct{})

JoinReaderSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinWriter

func JoinWriter(out chan<- *tar.Writer, inp ...*tar.Writer) (done <-chan struct{})

JoinWriter sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinWriterChan

func JoinWriterChan(out chan<- *tar.Writer, inp <-chan *tar.Writer) (done <-chan struct{})

JoinWriterChan sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func JoinWriterSlice

func JoinWriterSlice(out chan<- *tar.Writer, inp ...[]*tar.Writer) (done <-chan struct{})

JoinWriterSlice sends inputs on the given out channel and returns a done channel to receive one signal when inp has been drained

func MakeHeaderChan

func MakeHeaderChan() (out chan *tar.Header)

MakeHeaderChan returns a new open channel (simply a 'chan *tar.Header' that is).

Note: No 'Header-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myHeaderPipelineStartsHere := MakeHeaderChan()
// ... lot's of code to design and build Your favourite "myHeaderWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myHeaderPipelineStartsHere <- drop
}
close(myHeaderPipelineStartsHere)

Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)

Note: as always (except for PipeHeaderBuffer) the channel is unbuffered.

func MakeReaderChan

func MakeReaderChan() (out chan *tar.Reader)

MakeReaderChan returns a new open channel (simply a 'chan *tar.Reader' that is).

Note: No 'Reader-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myReaderPipelineStartsHere := MakeReaderChan()
// ... lot's of code to design and build Your favourite "myReaderWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myReaderPipelineStartsHere <- drop
}
close(myReaderPipelineStartsHere)

Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)

Note: as always (except for PipeReaderBuffer) the channel is unbuffered.

func MakeWriterChan

func MakeWriterChan() (out chan *tar.Writer)

MakeWriterChan returns a new open channel (simply a 'chan *tar.Writer' that is).

Note: No 'Writer-producer' is launched here yet! (as is in all the other functions).

This is useful to easily create corresponding variables such as

var myWriterPipelineStartsHere := MakeWriterChan()
// ... lot's of code to design and build Your favourite "myWriterWorkflowPipeline"
// ...
// ... *before* You start pouring data into it, e.g. simply via:
for drop := range water {
	myWriterPipelineStartsHere <- drop
}
close(myWriterPipelineStartsHere)

Hint: especially helpful, if Your piping library operates on some hidden (non-exported) type (or on a type imported from elsewhere - and You don't want/need or should(!) have to care.)

Note: as always (except for PipeWriterBuffer) the channel is unbuffered.

func PipeHeaderBuffer

func PipeHeaderBuffer(inp <-chan *tar.Header, cap int) (out <-chan *tar.Header)

PipeHeaderBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeHeaderFork

func PipeHeaderFork(inp <-chan *tar.Header) (out1, out2 <-chan *tar.Header)

PipeHeaderFork returns two channels to receive every result of inp before close.

Note: Yes, it is a VERY simple fanout - but sometimes all You need.

func PipeHeaderFunc

func PipeHeaderFunc(inp <-chan *tar.Header, act func(a *tar.Header) *tar.Header) (out <-chan *tar.Header)

PipeHeaderFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeHeaderMap for functional people, but 'map' has a very different meaning in go lang.

func PipeReaderBuffer

func PipeReaderBuffer(inp <-chan *tar.Reader, cap int) (out <-chan *tar.Reader)

PipeReaderBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeReaderFork

func PipeReaderFork(inp <-chan *tar.Reader) (out1, out2 <-chan *tar.Reader)

PipeReaderFork returns two channels to receive every result of inp before close.

Note: Yes, it is a VERY simple fanout - but sometimes all You need.

func PipeReaderFunc

func PipeReaderFunc(inp <-chan *tar.Reader, act func(a *tar.Reader) *tar.Reader) (out <-chan *tar.Reader)

PipeReaderFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeReaderMap for functional people, but 'map' has a very different meaning in go lang.

func PipeWriterBuffer

func PipeWriterBuffer(inp <-chan *tar.Writer, cap int) (out <-chan *tar.Writer)

PipeWriterBuffer returns a buffered channel with capacity cap to receive all inp before close.

func PipeWriterFork

func PipeWriterFork(inp <-chan *tar.Writer) (out1, out2 <-chan *tar.Writer)

PipeWriterFork returns two channels to receive every result of inp before close.

Note: Yes, it is a VERY simple fanout - but sometimes all You need.

func PipeWriterFunc

func PipeWriterFunc(inp <-chan *tar.Writer, act func(a *tar.Writer) *tar.Writer) (out <-chan *tar.Writer)

PipeWriterFunc returns a channel to receive every result of act applied to inp before close. Note: it 'could' be PipeWriterMap for functional people, but 'map' has a very different meaning in go lang.

func ReaderDaisy

func ReaderDaisy(inp <-chan *tar.Reader, tube ReaderTube) (out <-chan *tar.Reader)

ReaderDaisy returns a channel to receive all inp after having passed thru tube.

func ReaderDaisyChain

func ReaderDaisyChain(inp <-chan *tar.Reader, tubes ...ReaderTube) (out <-chan *tar.Reader)

ReaderDaisyChain returns a channel to receive all inp after having passed thru all tubes.

func SendProxyHeader

func SendProxyHeader(out chan<- *tar.Header) chan<- *tar.Header

SendProxyHeader returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.

Note: the expanding buffer is implemented via "container/ring"

func SendProxyReader

func SendProxyReader(out chan<- *tar.Reader) chan<- *tar.Reader

SendProxyReader returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.

Note: the expanding buffer is implemented via "container/ring"

func SendProxyWriter

func SendProxyWriter(out chan<- *tar.Writer) chan<- *tar.Writer

SendProxyWriter returns a channel to serve as a sending proxy to 'out'. Uses a goroutine to receive values from 'out' and store them in an expanding buffer, so that sending to 'out' never blocks.

Note: the expanding buffer is implemented via "container/ring"

func WriterDaisy

func WriterDaisy(inp <-chan *tar.Writer, tube WriterTube) (out <-chan *tar.Writer)

WriterDaisy returns a channel to receive all inp after having passed thru tube.

func WriterDaisyChain

func WriterDaisyChain(inp <-chan *tar.Writer, tubes ...WriterTube) (out <-chan *tar.Writer)

WriterDaisyChain returns a channel to receive all inp after having passed thru all tubes.

Types

type HeaderTube

type HeaderTube func(inp <-chan *tar.Header, out <-chan *tar.Header)

HeaderTube is the signature for a pipe function.

type ReaderTube

type ReaderTube func(inp <-chan *tar.Reader, out <-chan *tar.Reader)

ReaderTube is the signature for a pipe function.

type WriterTube

type WriterTube func(inp <-chan *tar.Writer, out <-chan *tar.Writer)

WriterTube is the signature for a pipe function.

Jump to

Keyboard shortcuts

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