mongodb

package
v0.0.0-...-a5aafae Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQueue

func NewQueue(conf QueueConfig) (monsterqueue.Queue, error)

Creates a new queue. The QueueConfig parameter will tell us how to connect to mongodb. This command will fail if the MongoDB server is not available.

Tasks registered in this queue instance will run when `ProcessLoop` is called in this *same* instance.

Types

type QueueConfig

type QueueConfig struct {
	Url              string // MongoDB connection url
	Database         string // MongoDB database name
	CollectionPrefix string // Prefix for all collections created in MongoDB
	PollingInterval  time.Duration
	WaitTask         bool // Wait the current task finishes to get another task
}

Jump to

Keyboard shortcuts

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