ephemeral

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

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

Broker run queue using local goroutines.

func (*Broker) Consume

func (b *Broker) Consume(pipe *jobs.Pipeline, execPool chan jobs.Handler, errHandler jobs.ErrorHandler) error

Consume configures pipeline to be consumed. With execPool to nil to disable consuming. Method can be called before the service is started!

func (*Broker) Init

func (b *Broker) Init() (bool, error)

Init configures broker.

func (*Broker) Listen

func (b *Broker) Listen(lsn func(event int, ctx interface{}))

Listen attaches server event watcher.

func (*Broker) Push

func (b *Broker) Push(pipe *jobs.Pipeline, j *jobs.Job) (string, error)

Push job into the worker.

func (*Broker) Register

func (b *Broker) Register(pipe *jobs.Pipeline) error

Register broker pipeline.

func (*Broker) Serve

func (b *Broker) Serve() error

Serve broker pipelines.

func (*Broker) Stat

func (b *Broker) Stat(pipe *jobs.Pipeline) (stat *jobs.Stat, err error)

Stat must consume statistics about given pipeline or return error.

func (*Broker) Stop

func (b *Broker) Stop()

Stop all pipelines.

Jump to

Keyboard shortcuts

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