file

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnPack

func UnPack(wg *sync.WaitGroup, file afero.File, messages chan rmq.Message) (n int, err error)

UnPack will decompress and send messages out on channel from file

Types

type Path

type Path struct {
	Wg *sync.WaitGroup
	// contains filtered or unexported fields
}

Path is a directory file path

func NewInput

func NewInput(path string) (*Path, error)

NewInput returns a *Path with a queue of files paths, all files in a directory

func NewOutput

func NewOutput(path string, batchSize int) (*Path, error)

NewOutput creates a Path to output files in from RabbitMQ

func (*Path) Receive

func (p *Path) Receive(messages chan rmq.Message, verify chan rmq.Verify) error

Receive will handle messages and save to path

func (*Path) Send

func (p *Path) Send(messages chan rmq.Message) error

Send delivers messages to the channel

type TarballBuilder

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

TarballBuilder build tarballs from the stream of incoming docs and spits out tarballs into a channel

func NewTarballBuilder

func NewTarballBuilder(tarSize int) (*TarballBuilder, error)

NewTarballBuilder created a TarballBuilder

func (*TarballBuilder) CloseWaiter

func (t *TarballBuilder) CloseWaiter(out chan []byte)

CloseWaiter waits for the wg and then closes

func (*TarballBuilder) Pack

func (t *TarballBuilder) Pack(messages chan rmq.Message, dir string, verify chan rmq.Verify) error

Pack messages from the channel into the directory

Jump to

Keyboard shortcuts

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