Versions in this module Expand all Collapse all v0 v0.1.1 Jan 28, 2020 v0.1.0 Jan 26, 2020 Changes in this version + const SizeNotSupported + const Version + var ErrorEphemeralIsFull = errors.New("ephemeral storage is full") + var ErrorOperationNotSupported = errors.New("operation not supported") + var ErrorQueueIsFull = errors.New("queue storage is full") + func UniqueId() string + type IQueue interface + EphemeralSize func() (int, error) + EphemeralStorageCapacity func() (int, error) + Finish func(id string) error + IsEphemeralStorageEnabled func() bool + Name func() string + OrphanMessages func(numSeconds int64) ([]*QueueMessage, error) + Queue func(msg *QueueMessage) (*QueueMessage, error) + QueueSize func() (int, error) + QueueStorageCapacity func() (int, error) + Requeue func(id string, silent bool) (*QueueMessage, error) + Take func() (*QueueMessage, error) + func NewInmemQueue(name string, queueCapacity int, ephemeralDisabled bool, ephemeralCapacity int) IQueue + type InmemQueue struct + func (q *InmemQueue) Destroy() + func (q *InmemQueue) EphemeralSize() (int, error) + func (q *InmemQueue) EphemeralStorageCapacity() (int, error) + func (q *InmemQueue) Finish(id string) error + func (q *InmemQueue) Init() error + func (q *InmemQueue) IsEphemeralStorageEnabled() bool + func (q *InmemQueue) Name() string + func (q *InmemQueue) OrphanMessages(numSeconds int64) ([]*QueueMessage, error) + func (q *InmemQueue) Queue(msg *QueueMessage) (*QueueMessage, error) + func (q *InmemQueue) QueueSize() (int, error) + func (q *InmemQueue) QueueStorageCapacity() (int, error) + func (q *InmemQueue) Requeue(id string, silent bool) (*QueueMessage, error) + func (q *InmemQueue) Take() (*QueueMessage, error) + type QueueMessage struct + Id string + NumRequeues int + Payload []byte + QueueTimestamp time.Time + TakenTimestamp time.Time + Timestamp time.Time + func CloneQueueMessage(msg QueueMessage) QueueMessage + func NewQueueMessage(payload []byte) *QueueMessage