spooler

package
v5.2.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Output

type Output interface {
	Send(events []*input.Event) bool
}

Output spooler sends event to through Send method

type Spooler

type Spooler struct {
	Channel chan *input.Event // Channel is the input to the Spooler.
	// contains filtered or unexported fields
}

Spooler aggregates the events and sends the aggregated data to the publisher.

func New

func New(
	config *cfg.Config,
	out Output,
) (*Spooler, error)

New creates and returns a new Spooler. The returned Spooler must be started by calling Start before it can be used.

func (*Spooler) Start

func (s *Spooler) Start()

Start starts the Spooler. Stop must be called to stop the Spooler.

func (*Spooler) Stop

func (s *Spooler) Stop()

Stop stops this Spooler. This method blocks until all events have been flushed to the publisher. The method should only be invoked one time after Start has been invoked.

Jump to

Keyboard shortcuts

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