queue

package
v0.0.0-...-34e3095 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileQueue

type FileQueue struct {
	MemoryQueue
	// contains filtered or unexported fields
}

func NewFileQueue

func NewFileQueue(path string, noInit bool) *FileQueue

func (*FileQueue) Close

func (fq *FileQueue) Close(context.Context) error

func (*FileQueue) Open

func (fq *FileQueue) Open(context.Context) error

type MemoryQueue

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

func NewMemoryQueueFromFile

func NewMemoryQueueFromFile(fileName string) (*MemoryQueue, error)

func (*MemoryQueue) Add

func (sq *MemoryQueue) Add(ctx context.Context, element string) error

func (*MemoryQueue) Close

func (sq *MemoryQueue) Close(ctx context.Context) error

func (*MemoryQueue) Len

func (sq *MemoryQueue) Len(ctx context.Context) (int, error)

func (*MemoryQueue) Open

func (sq *MemoryQueue) Open(ctx context.Context) error

func (*MemoryQueue) Remove

func (sq *MemoryQueue) Remove(ctx context.Context) (string, error)

type Queue

type Queue interface {
	Add(context.Context, string) error
	Remove(context.Context) (string, error)
	Len(context.Context) (int, error)

	Open(context.Context) error
	Close(context.Context) error
}

type RabbitMQQueue

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

func NewRabbitMQQueue

func NewRabbitMQQueue(uri, queue string) (*RabbitMQQueue, error)

func (*RabbitMQQueue) Add

func (sq *RabbitMQQueue) Add(ctx context.Context, element string) error

func (*RabbitMQQueue) Close

func (sq *RabbitMQQueue) Close(ctx context.Context) error

func (*RabbitMQQueue) Len

func (sq *RabbitMQQueue) Len(ctx context.Context) (int, error)

func (*RabbitMQQueue) Open

func (sq *RabbitMQQueue) Open(ctx context.Context) error

func (*RabbitMQQueue) Remove

func (sq *RabbitMQQueue) Remove(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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