queue

package
v0.0.0-...-dd4e4d9 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package queue implements a task queue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DomainAccessMessage

type DomainAccessMessage struct {
	Domain      string          `json:"domain"`
	RequestType dnsmessage.Type `json:"request_type"`
}

type Queue

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

Queue is a task queue.

func OpenQueue

func OpenQueue() (*Queue, error)

OpenQueue creates a new task queue.

func (*Queue) Pop

func (q *Queue) Pop() (string, error)

Pop pops a task and blocks if the queue is empty.

func (*Queue) Push

func (q *Queue) Push(msg string) error

Push pushes a new task to the queue.

Jump to

Keyboard shortcuts

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