spool

package
v0.0.0-...-c2832fb Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSpoolDir = "/var/lib/cypress/spool"
View Source
const MaxFiles = 10
View Source
const PerFileSize = (1024 * 1024) // 1 meg per file

Variables

This section is empty.

Functions

This section is empty.

Types

type Recv

type Recv struct {
	Dir string `short:"d" description:"where to write the messages to"`
}

func (*Recv) Execute

func (r *Recv) Execute(args []string) error

type Send

type Send struct {
	Dir string `short:"d" description:"where to write the messages to"`
}

func (*Send) Execute

func (s *Send) Execute(args []string) error

type Spool

type Spool struct {

	// The size of each file will get before it's rotated
	PerFileSize int64

	// How many rotate files to keep
	MaxFiles int

	OnRotate func(string) error
	// contains filtered or unexported fields
}

func NewSpool

func NewSpool(root string) (*Spool, error)

func (*Spool) Close

func (sf *Spool) Close() error

func (*Spool) CurrentFile

func (sf *Spool) CurrentFile() string

func (*Spool) Flush

func (sf *Spool) Flush() error

func (*Spool) Generator

func (s *Spool) Generator() (*SpoolGenerator, error)

func (*Spool) Receive

func (sf *Spool) Receive(m *cypress.Message) error

func (*Spool) Rotate

func (sf *Spool) Rotate() error

type SpoolGenerator

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

func (*SpoolGenerator) Close

func (sg *SpoolGenerator) Close() error

func (*SpoolGenerator) Generate

func (sg *SpoolGenerator) Generate() (*cypress.Message, error)

type SpoolPlugin

type SpoolPlugin struct {
	Directory string `description:"directory to read/write messages to"`
}

func (*SpoolPlugin) Generator

func (s *SpoolPlugin) Generator() (cypress.Generator, error)

func (*SpoolPlugin) Receiver

func (s *SpoolPlugin) Receiver() (cypress.Receiver, error)

Jump to

Keyboard shortcuts

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