inmem

package
v0.0.0-...-8d54491 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InmemBroker

type InmemBroker struct {
	Closed bool
	Queues map[string][]interface{}
	// contains filtered or unexported fields
}

InmemBroker implements the Broker interface in-memory

func NewInmemBroker

func NewInmemBroker() *InmemBroker

func (*InmemBroker) Close

func (i *InmemBroker) Close() error

func (*InmemBroker) Consumer

func (i *InmemBroker) Consumer(q string) (broker.Consumer, error)

func (*InmemBroker) Publisher

func (i *InmemBroker) Publisher(q string) (broker.Publisher, error)

type InmemConsumer

type InmemConsumer struct {
	Broker      *InmemBroker
	Queue       string
	Closed      bool
	NeedAck     bool
	LastDequeue interface{}
}

InmemConsumer implements the Consumer interface

func (*InmemConsumer) Ack

func (i *InmemConsumer) Ack() error

func (*InmemConsumer) Close

func (i *InmemConsumer) Close() error

func (*InmemConsumer) Consume

func (i *InmemConsumer) Consume(out interface{}) error

func (*InmemConsumer) ConsumeAck

func (i *InmemConsumer) ConsumeAck(out interface{}) error

func (*InmemConsumer) ConsumeTimeout

func (i *InmemConsumer) ConsumeTimeout(out interface{}, timeout time.Duration) error

func (*InmemConsumer) Nack

func (i *InmemConsumer) Nack() error

type InmemPublisher

type InmemPublisher struct {
	Broker *InmemBroker
	Queue  string
	Closed bool
}

InmemConsumer implements the Publisher interface

func (*InmemPublisher) Close

func (i *InmemPublisher) Close() error

func (*InmemPublisher) Publish

func (i *InmemPublisher) Publish(in interface{}) error

Jump to

Keyboard shortcuts

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