basicqueue

package module
v0.9.1-RC1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Overview

Package basicqueue implements very simple unicast and broadcast message queueing between goroutines

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicQueue

type BasicQueue struct {
	AESengine aesengine.AESEngine
	// contains filtered or unexported fields
}

func NewEncryptedJsonQueue

func NewEncryptedJsonQueue(slog *servicelogger.Logger, qtype BasicQueueType, qname string, maxQueueDepth int, expiration bool, defaultExpirationTime time.Duration) (bq *BasicQueue, err error)

func NewEncryptedQueue

func NewEncryptedQueue(slog *servicelogger.Logger, qtype BasicQueueType, qname string, maxQueueDepth int, expiration bool, defaultExpirationTime time.Duration) (bq *BasicQueue, err error)

func NewJsonQueue

func NewJsonQueue(slog *servicelogger.Logger, qtype BasicQueueType, qname string, maxQueueDepth int, expiration bool, defaultExpirationTime time.Duration) (bq *BasicQueue, err error)

func NewQueue

func NewQueue(slog *servicelogger.Logger, qtype BasicQueueType, qname string, maxQueueDepth int, expiration bool, defaultExpirationTime time.Duration) (bq *BasicQueue, err error)

func (*BasicQueue) AddJsonMessage

func (bq *BasicQueue) AddJsonMessage(identifier string, source string, destination string, msgtype string, messagetext string) (err error)

func (*BasicQueue) AddMessage

func (bq *BasicQueue) AddMessage(identifier string, messagetext string) (err error)

func (BasicQueue) GetMessageIds

func (bq BasicQueue) GetMessageIds() []string

func (BasicQueue) GetName

func (bq BasicQueue) GetName() string

func (BasicQueue) GetQueueDepth

func (bq BasicQueue) GetQueueDepth() int

func (*BasicQueue) Poll

func (bq *BasicQueue) Poll(identifier string) bool

func (*BasicQueue) PollWithHistory

func (bq *BasicQueue) PollWithHistory(identifier string, messageIDHistory []string) bool

func (BasicQueue) QStats

func (bq BasicQueue) QStats(identifier string) (msgcount int, numproducers int, numconsumers int, encrypted bool, err error)

func (*BasicQueue) Read

func (bq *BasicQueue) Read(identifier string) (msg string, err error)

func (*BasicQueue) ReadJson

func (bq *BasicQueue) ReadJson(identifier string) (jqm JSonQueueMessage, err error)

func (*BasicQueue) ReadJsonWithHistory

func (bq *BasicQueue) ReadJsonWithHistory(identifier string, messageIDHistory []string) (jqm JSonQueueMessage, err error)

func (*BasicQueue) ReadSpecificJsonMessage

func (bq *BasicQueue) ReadSpecificJsonMessage(messageid string) (jqm JSonQueueMessage, err error)

func (*BasicQueue) ReadWithHistory

func (bq *BasicQueue) ReadWithHistory(identifier string, messageIDHistory []string) (msg string, msgid string, err error)

func (*BasicQueue) RegisterConsumer

func (bq *BasicQueue) RegisterConsumer(identifier string) (err error)

func (*BasicQueue) RegisterProducer

func (bq *BasicQueue) RegisterProducer(identifier string) (err error)

func (*BasicQueue) UnmarshalMessage

func (bq *BasicQueue) UnmarshalMessage(marshaled string) (unmarshaled JSonQueueMessage, err error)

type BasicQueueType

type BasicQueueType int
const (
	BQT_UNICAST      BasicQueueType = 1
	BQT_BROADCAST    BasicQueueType = 2
	BQT_SUBSCRIPTION BasicQueueType = 3
)

type JSonQueueMessage

type JSonQueueMessage struct {
	MessageID   string
	Source      string
	Destination string
	MessageType string
	Payload     string
	Sent        string
	Expires     bool
	Expiration  time.Time
	PopOnRead   bool
}

type QueueConsumer

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

type QueueConsumers

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

type QueueMessage

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

type QueueMessages

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

type QueueProducer

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

type QueueProducers

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

Jump to

Keyboard shortcuts

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