Documentation ¶
Index ¶
- Constants
- Variables
- func NewMQImpressionsStorage(queueSize int, isFull chan<- string, logger logging.LoggerInterface, ...) storage.ImpressionStorage
- type MQEventsStorage
- 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) PopNRaw(n int64) ([]string, int64, 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 ¶
func NewMQImpressionsStorage ¶
func NewMQImpressionsStorage(queueSize int, isFull chan<- string, logger logging.LoggerInterface, runtimeTelemetry storage.TelemetryRuntimeProducer) storage.ImpressionStorage
NewMQImpressionsStorage returns an instance of MQEventsStorage
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, runtimeTelemetry storage.TelemetryRuntimeProducer) *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
type MQImpressionsStorage ¶
type MQImpressionsStorage struct {
// contains filtered or unexported fields
}
MQImpressionsStorage in memory events storage
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) PopNRaw ¶
func (s *MQImpressionsStorage) PopNRaw(n int64) ([]string, int64, error)
PopNRaw 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.