queue

package
v0.0.0-...-98b2de1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, q *Manager) context.Context

Types

type Manager

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

func FromContext

func FromContext(ctx context.Context) *Manager

func NewManager

func NewManager(idg *uid.Generator, sd storage.Driver) *Manager

func (*Manager) Ack

func (q *Manager) Ack(eid uid.ID) error

func (*Manager) Dequeue

func (q *Manager) Dequeue(name string, wait time.Duration, cancel <-chan struct{}) (e *storage.Envelope, err error)

func (*Manager) Enqueue

func (q *Manager) Enqueue(name string, msg *storage.Message, p *Properties) (map[string]*storage.EnqueueMeta, error)

func (*Manager) HandleEvent

func (q *Manager) HandleEvent(et event.EventType, v interface{})

func (*Manager) Properties

func (q *Manager) Properties(name string, inherit bool) *Properties

func (*Manager) SetProperties

func (q *Manager) SetProperties(name string, props *Properties)

type Properties

type Properties struct {
	Retry     *types.Retry    `json:"retry,omitempty"`
	Timeout   *types.Duration `json:"timeout,omitempty"`
	AccumTime *types.Duration `json:"accum_time,omitempty"`
	Recurse   *bool           `json:"recurse,omitempty"`
}

func NewProperties

func NewProperties() *Properties

func (*Properties) SetAccumTime

func (p *Properties) SetAccumTime(d types.Duration) *Properties

func (*Properties) SetRecurse

func (p *Properties) SetRecurse(b bool) *Properties

func (*Properties) SetRetry

func (p *Properties) SetRetry(n types.Retry) *Properties

func (*Properties) SetTimeout

func (p *Properties) SetTimeout(d types.Duration) *Properties

Jump to

Keyboard shortcuts

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