eventdriver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	// Consume() takes a slice of topics to listen on, and returns a channel which generates events.
	// If len(topics) == 0, consumer should return all/default set of events.
	Consume(topics []string) (<-chan events.Event, error)

	// Topics() returns list of available topics.
	Topics() []string

	// Should be called to stop consuming events.
	Close() error
}

Consumer consumes events from 3rd party systems.

type Driver

type Driver interface {
	Run() error
	Close() error
}

Driver understands 3rd party systems, consumes their events and publishes them to internal queue

func New

func New(queue events.Queue, consumer Consumer) (Driver, error)

Directories

Path Synopsis
drivers

Jump to

Keyboard shortcuts

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