basic

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sink

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

Sink demonstrates the basic usage of a Sink (primarily for example code)

func InitSink

func InitSink(v *viper.Viper) (*Sink, error)

InitSink initializes a basic Sink that logs a map of what messages have been sent to which destinations.

func (*Sink) Close

func (s *Sink) Close() error

Close closes the Sink

func (*Sink) Send

func (s *Sink) Send(m frizzle.Msg, dest string) error

Send sends a Msg to provided dest

func (*Sink) Sent

func (s *Sink) Sent(dest string) []frizzle.Msg

Sent reports messages sent on a BasicSink

type Source

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

Source demonstrates the basic functionality of a Source (primarily for use in example code)

func InitSource

func InitSource(config *viper.Viper) (*Source, chan<- frizzle.Msg, error)

InitSource initializes a basic Source populated with the string values in `basic_values` from provided viper. Close() will block until Ack() or Fail() has been called on all values.

func (*Source) Ack

func (s *Source) Ack(m frizzle.Msg) error

Ack acknowledges that processing is complete for the Msg

func (*Source) Close

func (s *Source) Close() error

Close errors if UnAcked Msgs remain

func (*Source) Fail

func (s *Source) Fail(m frizzle.Msg) error

Fail reports the Msg as failed

func (*Source) Failed

func (s *Source) Failed() []frizzle.Msg

Failed reports all Msgs which were Failed for the provided basic Source used for demonstrating functionality in the Example()

func (*Source) Input

func (s *Source) Input() chan<- frizzle.Msg

Input returns a channel to input Msgs on

func (*Source) Receive

func (s *Source) Receive() <-chan frizzle.Msg

Receive returns a channel to receive Msgs on

func (*Source) Stop

func (s *Source) Stop() error

Stop receiving Msgs

func (*Source) UnAcked

func (s *Source) UnAcked() []frizzle.Msg

UnAcked reports all Msgs which are currently unAcked for the provided basic Source used for demonstrating functionality in the Example()

func (*Source) UnAckedCount

func (s *Source) UnAckedCount() int

UnAckedCount reports the count of UnAcked Msgs without generating a slice

Jump to

Keyboard shortcuts

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