single

package
v5.6.14+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mode

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

Mode sends all Output on one single connection. If connection is not available, the output plugin blocks until the connection is either available again or the connection mode is closed by Close.

func New

func New(
	client mode.ProtocolClient,
	maxAttempts int,
	waitRetry, timeout, maxWaitRetry time.Duration,
) (*Mode, error)

New creates a new single connection mode using exactly one ProtocolClient connection.

func (*Mode) Close

func (s *Mode) Close() error

Close closes the underlying connection.

func (*Mode) PublishEvent

func (s *Mode) PublishEvent(
	signaler op.Signaler,
	opts outputs.Options,
	data outputs.Data,
) error

PublishEvent forwards a single event. On failure PublishEvent tries to reconnect.

func (*Mode) PublishEvents

func (s *Mode) PublishEvents(
	signaler op.Signaler,
	opts outputs.Options,
	data []outputs.Data,
) error

PublishEvents tries to publish the events with retries if connection becomes unavailable. On failure PublishEvents tries to reconnect.

Jump to

Keyboard shortcuts

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