embeddedqueue

package
v0.0.0-...-c7c8722 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DirectiveName = "embeddedqueue"

Functions

func Factory

func Factory(loader func(v interface{}) error) (notificationqueue.Directive, error)

Types

type Config

type Config struct {
	Engine kvdb.Config
	Queue  cronqueue.Config
	Retry  *cronqueue.PlainRetry
}

func (*Config) AppylToPublisher

func (c *Config) AppylToPublisher(p *notificationqueue.Publisher) error

type Engine

type Engine struct {
	DB *kvdb.Database
	// contains filtered or unexported fields
}

Engine embedded store

func New

func New() *Engine

New create embedded store

func (*Engine) Insert

func (e *Engine) Insert(execution *notificationqueue.Execution) error

Insert insert execution to queue. Do nothing if notifiaction exsits

func (*Engine) List

func (e *Engine) List(start string, count int) ([]*notificationqueue.Execution, string, error)

List list queued Execution form start

func (*Engine) Remove

func (e *Engine) Remove(nid string) error

Remove notifcation with given nid form queue. Do nothing if notificatio not found

func (*Engine) Replace

func (e *Engine) Replace(eid string, new *notificationqueue.Execution) error

Replace exectution in queue with given eid. Do nothing if eid not match.

func (*Engine) Start

func (e *Engine) Start() error

Start start store

func (*Engine) Stop

func (e *Engine) Stop() error

Stop stop store

Jump to

Keyboard shortcuts

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