eventdriver

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2018 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.CloudEvent, error)

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

	// Close() 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(client driverclient.Client, consumer Consumer) (Driver, error)

New creates a new event driver

Directories

Path Synopsis
drivers

Jump to

Keyboard shortcuts

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