stream

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2015 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 Broadcast

type Broadcast struct {
	core.StreamBase
}

Broadcast stream plugin Configuration example

  • "stream.Broadcast": Enable: true Stream: "data" Formatter: "format.Envelope" Filter: "filter.All"

Messages will be sent to all producers attached to this stream.

Stream defines the stream this stream plugin binds to.

Formatter defines a formatter that is applied to all messages sent to this stream. This can be used to bring different streams to the same format required by a producer formatter. By default this is set to format.Forward.

Filter defines a filter function that removes or allows certain messages to pass through this stream. By default this is set to filter.All.

TimeoutMs sets a timeout in milliseconds for messages to wait if a producer's queue is full. This will actually overwrite the ChannelTimeoutMs value for any attached producer and follows the same rules. If no value is set, the producer's timout value is used.

func (*Broadcast) Configure added in v0.4.0

func (stream *Broadcast) Configure(conf core.PluginConfig) error

Configure initializes this distributor with values from a plugin config.

type Random

type Random struct {
	core.StreamBase
}

Random stream plugin Configuration example

  • "stream.Random": Enable: true Stream: "data" Formatter: "format.Envelope" Filter: "filter.All" StickyStream: true

Messages will be sent to one of the producers attached to this stream. The producer used is defined randomly.

This stream defines the same fields as stream.Broadcast.

func (*Random) Configure

func (stream *Random) Configure(conf core.PluginConfig) error

Configure initializes this distributor with values from a plugin config.

type RoundRobin

type RoundRobin struct {
	core.StreamBase
	// contains filtered or unexported fields
}

RoundRobin stream plugin Configuration example

  • "stream.RoundRobin": Enable: true Stream: "data" Formatter: "format.Envelope" Filter: "filter.All"

Messages will be sent to one of the producers attached to this stream. Producers will be switched one-by-one.

This stream defines the same fields as stream.Broadcast.

func (*RoundRobin) Configure

func (stream *RoundRobin) Configure(conf core.PluginConfig) error

Configure initializes this distributor with values from a plugin config.

type Route added in v0.4.0

type Route struct {
	core.StreamBase
	// contains filtered or unexported fields
}

Route stream plugin Configuration example

  • "stream.Route": Enable: true Stream: "data" Routes:
  • "db1"
  • "db2"
  • "data"

Messages will be routed to the streams configured. If no route is configured the message is discarded.

Routes defines a 1:n stream remapping. Messages are reassigned to all of stream(s) in this list. If no route is set messages are forwarded on the incoming stream. When routing to multiple streams, the incoming stream has to be listed explicitly to be used.

This stream defines the same fields as stream.Broadcast.

func (*Route) Configure added in v0.4.0

func (stream *Route) Configure(conf core.PluginConfig) error

Configure initializes this distributor with values from a plugin config.

func (*Route) Enqueue added in v0.4.0

func (stream *Route) Enqueue(msg core.Message)

Enqueue overloads the standard Enqueue method to allow direct routing to explicit stream targets

Jump to

Keyboard shortcuts

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