Documentation
¶
Index ¶
- Constants
- Variables
- type MQEventsStorage
- func (s *MQEventsStorage) Count() int64
- func (s *MQEventsStorage) Drop(size *int64) error
- func (s *MQEventsStorage) Empty() bool
- func (s *MQEventsStorage) PopN(n int64) ([]dtos.EventDTO, error)
- func (s *MQEventsStorage) PopNWithMetadata(n int64) ([]dtos.QueueStoredEventDTO, error)
- func (s *MQEventsStorage) Push(event dtos.EventDTO, size int) error
- type MQImpressionsStorage
- func (s *MQImpressionsStorage) Count() int64
- func (s *MQImpressionsStorage) Drop(size *int64) error
- func (s *MQImpressionsStorage) Empty() bool
- func (s *MQImpressionsStorage) LogImpressions(impressions []dtos.Impression) error
- func (s *MQImpressionsStorage) PopN(n int64) ([]dtos.Impression, error)
- func (s *MQImpressionsStorage) PopNWithMetadata(n int64) ([]dtos.ImpressionQueueObject, error)
Constants ¶
View Source
const MaxAccumulatedBytes = 5 * 1024 * 1024
MaxAccumulatedBytes is the maximum size to accumulate in events before flush (in bytes)
Variables ¶
View Source
var ErrorMaxSizeReached = errors.New("Queue max size has been reached")
ErrorMaxSizeReached queue max size error
Functions ¶
This section is empty.
Types ¶
type MQEventsStorage ¶
type MQEventsStorage struct {
// contains filtered or unexported fields
}
MQEventsStorage in memory events storage
func NewMQEventsStorage ¶
func NewMQEventsStorage(queueSize int, isFull chan string, logger logging.LoggerInterface) *MQEventsStorage
NewMQEventsStorage returns an instance of MQEventsStorage
func (*MQEventsStorage) Count ¶
func (s *MQEventsStorage) Count() int64
Count returns the number of events into slice
func (*MQEventsStorage) Empty ¶
func (s *MQEventsStorage) Empty() bool
Empty returns if slice len if zero
func (*MQEventsStorage) PopN ¶
func (s *MQEventsStorage) PopN(n int64) ([]dtos.EventDTO, error)
PopN pop N elements from queue
func (*MQEventsStorage) PopNWithMetadata ¶
func (s *MQEventsStorage) PopNWithMetadata(n int64) ([]dtos.QueueStoredEventDTO, error)
PopNWithMetadata pop N elements from queue
type MQImpressionsStorage ¶
type MQImpressionsStorage struct {
// contains filtered or unexported fields
}
MQImpressionsStorage in memory events storage
func NewMQImpressionsStorage ¶
func NewMQImpressionsStorage(queueSize int, isFull chan<- string, logger logging.LoggerInterface) *MQImpressionsStorage
NewMQImpressionsStorage returns an instance of MQEventsStorage
func (*MQImpressionsStorage) Drop ¶
func (s *MQImpressionsStorage) Drop(size *int64) error
Drop drops
func (*MQImpressionsStorage) Empty ¶
func (s *MQImpressionsStorage) Empty() bool
Empty returns if slice len if zero
func (*MQImpressionsStorage) LogImpressions ¶
func (s *MQImpressionsStorage) LogImpressions(impressions []dtos.Impression) error
LogImpressions inserts impressions into the queue
func (*MQImpressionsStorage) PopN ¶
func (s *MQImpressionsStorage) PopN(n int64) ([]dtos.Impression, error)
PopN pop N elements from queue
func (*MQImpressionsStorage) PopNWithMetadata ¶
func (s *MQImpressionsStorage) PopNWithMetadata(n int64) ([]dtos.ImpressionQueueObject, error)
PopNWithMetadata pop N elements from queue
Click to show internal directories.
Click to hide internal directories.