queue

package
v0.0.0-...-c791c95 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package queue provides basic direct queue functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

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

Queue contains the relevant information about the queue.

func New

func New(queueName string) (*Queue, error)

New declares a queue with the given name. Returns the queue, and an error on failure.

func (*Queue) Close

func (q *Queue) Close() error

Close gracefully closes the connection.

func (*Queue) Consume

func (q *Queue) Consume(consumer messageConsumer) error

Consume registers the consumer with the message-broker.

func (*Queue) Produce

func (q *Queue) Produce(message []byte) error

Produce publishes the message to the message-broker.

func (*Queue) SetContentType

func (q *Queue) SetContentType(contentType string)

SetContentType sets the content type of the message.

Jump to

Keyboard shortcuts

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