spooler

package
v5.6.15 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

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