linkqueue

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkQueue

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

LinkQueue is the in memory link cache object.

func NewLinkQueue

func NewLinkQueue(dataDir string) (*LinkQueue, error)

NewLinkQueue initialises the cache with a default expiration duration.

func (*LinkQueue) Close

func (q *LinkQueue) Close() error

Close closes connection to the queue.

func (*LinkQueue) ContainsItems

func (q *LinkQueue) ContainsItems() bool

ContainsItems returns true if length > 0.

func (*LinkQueue) DeQueue

func (q *LinkQueue) DeQueue() <-chan *url.URL

DeQueue is a blocking operation and returns a channel that receives a URL from the queue.

func (*LinkQueue) EnQueue

func (q *LinkQueue) EnQueue(link *url.URL) error

EnQueue appends a url to the queue.

func (*LinkQueue) Length

func (q *LinkQueue) Length() uint64

Length returns length of queue.

Jump to

Keyboard shortcuts

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