Documentation
¶
Index ¶
- type MockEventStorage
- func (m MockEventStorage) Count() int64
- func (m MockEventStorage) Drop(size *int64) error
- func (m MockEventStorage) Empty() bool
- func (m MockEventStorage) PopN(n int64) ([]dtos.EventDTO, error)
- func (m MockEventStorage) PopNWithMetadata(n int64) ([]dtos.QueueStoredEventDTO, error)
- func (m MockEventStorage) Push(event dtos.EventDTO, size int) error
- type MockImpressionStorage
- func (m MockImpressionStorage) Count() int64
- func (m MockImpressionStorage) Drop(size *int64) error
- func (m MockImpressionStorage) Empty() bool
- func (m MockImpressionStorage) LogImpressions(impressions []dtos.Impression) error
- func (m MockImpressionStorage) PopN(n int64) ([]dtos.Impression, error)
- func (m MockImpressionStorage) PopNWithMetadata(n int64) ([]dtos.ImpressionQueueObject, error)
- type MockMetricStorage
- func (m MockMetricStorage) IncCounter(key string)
- func (m MockMetricStorage) IncLatency(metricName string, index int)
- func (m MockMetricStorage) PeekCounters() map[string]int64
- func (m MockMetricStorage) PeekLatencies() map[string][]int64
- func (m MockMetricStorage) PopCounters() []dtos.CounterDTO
- func (m MockMetricStorage) PopCountersWithMetadata() (*dtos.CounterDataBulk, error)
- func (m MockMetricStorage) PopGauges() []dtos.GaugeDTO
- func (m MockMetricStorage) PopGaugesWithMetadata() (*dtos.GaugeDataBulk, error)
- func (m MockMetricStorage) PopLatencies() []dtos.LatenciesDTO
- func (m MockMetricStorage) PopLatenciesWithMetadata() (*dtos.LatencyDataBulk, error)
- func (m MockMetricStorage) PutGauge(key string, gauge float64)
- type MockSegmentStorage
- func (m MockSegmentStorage) ChangeNumber(segmentName string) (int64, error)
- func (m MockSegmentStorage) CountRemovedKeys(segmentName string) int64
- func (m MockSegmentStorage) Keys(segmentName string) *set.ThreadUnsafeSet
- func (m MockSegmentStorage) SegmentContainsKey(segmentName string, key string) (bool, error)
- func (m MockSegmentStorage) SetChangeNumber(segmentName string, till int64) error
- func (m MockSegmentStorage) Update(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet, ...) error
- type MockSplitStorage
- func (m MockSplitStorage) All() []dtos.SplitDTO
- func (m MockSplitStorage) ChangeNumber() (int64, error)
- func (m MockSplitStorage) FetchMany(splitNames []string) map[string]*dtos.SplitDTO
- func (m MockSplitStorage) KillLocally(splitName string, defaultTreatment string, changeNumber int64)
- func (m MockSplitStorage) PutMany(splits []dtos.SplitDTO, changeNumber int64)
- func (m MockSplitStorage) Remove(splitname string)
- func (m MockSplitStorage) SegmentNames() *set.ThreadUnsafeSet
- func (m MockSplitStorage) SetChangeNumber(changeNumber int64) error
- func (m MockSplitStorage) Split(splitName string) *dtos.SplitDTO
- func (m MockSplitStorage) SplitNames() []string
- func (m MockSplitStorage) TrafficTypeExists(trafficType string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockEventStorage ¶
type MockEventStorage struct {
EmptyCall func() bool
CountCall func() int64
PopNCall func(n int64) ([]dtos.EventDTO, error)
PopNWithMetadataCall func(n int64) ([]dtos.QueueStoredEventDTO, error)
PushCall func(event dtos.EventDTO, size int) error
DropCall func(size *int64) error
}
MockEventStorage is a mocked implementation of Event Storage
func (MockEventStorage) PopN ¶
func (m MockEventStorage) PopN(n int64) ([]dtos.EventDTO, error)
PopN mock
func (MockEventStorage) PopNWithMetadata ¶
func (m MockEventStorage) PopNWithMetadata(n int64) ([]dtos.QueueStoredEventDTO, error)
PopNWithMetadata mock
type MockImpressionStorage ¶
type MockImpressionStorage struct {
EmptyCall func() bool
CountCall func() int64
LogImpressionsCall func(impressions []dtos.Impression) error
PopNCall func(n int64) ([]dtos.Impression, error)
PopNWithMetadataCall func(n int64) ([]dtos.ImpressionQueueObject, error)
DropCall func(size *int64) error
}
MockImpressionStorage is a mocked implementation of Impression Storage
func (MockImpressionStorage) Drop ¶
func (m MockImpressionStorage) Drop(size *int64) error
Drop mock
func (MockImpressionStorage) LogImpressions ¶
func (m MockImpressionStorage) LogImpressions(impressions []dtos.Impression) error
LogImpressions mock
func (MockImpressionStorage) PopN ¶
func (m MockImpressionStorage) PopN(n int64) ([]dtos.Impression, error)
PopN mock
func (MockImpressionStorage) PopNWithMetadata ¶
func (m MockImpressionStorage) PopNWithMetadata(n int64) ([]dtos.ImpressionQueueObject, error)
PopNWithMetadata mock
type MockMetricStorage ¶
type MockMetricStorage struct {
IncCounterCall func(key string)
IncLatencyCall func(metricName string, index int)
PutGaugeCall func(key string, gauge float64)
PopGaugesCall func() []dtos.GaugeDTO
PopLatenciesCall func() []dtos.LatenciesDTO
PopCountersCall func() []dtos.CounterDTO
PeekCountersCall func() map[string]int64
PeekLatenciesCall func() map[string][]int64
PopGaugesWithMetadataCall func() (*dtos.GaugeDataBulk, error)
PopCountersWithMetadataCall func() (*dtos.CounterDataBulk, error)
PopLatenciesWithMetadataCall func() (*dtos.LatencyDataBulk, error)
}
MockMetricStorage is a mocked implementation of Metric Storage
func (MockMetricStorage) IncCounter ¶
func (m MockMetricStorage) IncCounter(key string)
IncCounter mock
func (MockMetricStorage) IncLatency ¶
func (m MockMetricStorage) IncLatency(metricName string, index int)
IncLatency mock
func (MockMetricStorage) PeekCounters ¶
func (m MockMetricStorage) PeekCounters() map[string]int64
PeekCounters mock
func (MockMetricStorage) PeekLatencies ¶
func (m MockMetricStorage) PeekLatencies() map[string][]int64
PeekLatencies mock
func (MockMetricStorage) PopCounters ¶
func (m MockMetricStorage) PopCounters() []dtos.CounterDTO
PopCounters mock
func (MockMetricStorage) PopCountersWithMetadata ¶
func (m MockMetricStorage) PopCountersWithMetadata() (*dtos.CounterDataBulk, error)
PopCountersWithMetadata mock
func (MockMetricStorage) PopGauges ¶
func (m MockMetricStorage) PopGauges() []dtos.GaugeDTO
PopGauges mock
func (MockMetricStorage) PopGaugesWithMetadata ¶
func (m MockMetricStorage) PopGaugesWithMetadata() (*dtos.GaugeDataBulk, error)
PopGaugesWithMetadata mock
func (MockMetricStorage) PopLatencies ¶
func (m MockMetricStorage) PopLatencies() []dtos.LatenciesDTO
PopLatencies mock
func (MockMetricStorage) PopLatenciesWithMetadata ¶
func (m MockMetricStorage) PopLatenciesWithMetadata() (*dtos.LatencyDataBulk, error)
PopLatenciesWithMetadata mock
func (MockMetricStorage) PutGauge ¶
func (m MockMetricStorage) PutGauge(key string, gauge float64)
PutGauge mock
type MockSegmentStorage ¶
type MockSegmentStorage struct {
ChangeNumberCall func(segmentName string) (int64, error)
KeysCall func(segmentName string) *set.ThreadUnsafeSet
UpdateCall func(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet, changeNumber int64) error
SegmentContainsKeyCall func(segmentName string, key string) (bool, error)
SetChangeNumberCall func(segmentName string, till int64) error
CountRemovedKeysCall func(segmentName string) int64
}
MockSegmentStorage is a mocked implementation of Segment Storage
func (MockSegmentStorage) ChangeNumber ¶
func (m MockSegmentStorage) ChangeNumber(segmentName string) (int64, error)
ChangeNumber mock
func (MockSegmentStorage) CountRemovedKeys ¶
func (m MockSegmentStorage) CountRemovedKeys(segmentName string) int64
CountRemovedKeys mock
func (MockSegmentStorage) Keys ¶
func (m MockSegmentStorage) Keys(segmentName string) *set.ThreadUnsafeSet
Keys mock
func (MockSegmentStorage) SegmentContainsKey ¶
func (m MockSegmentStorage) SegmentContainsKey(segmentName string, key string) (bool, error)
SegmentContainsKey mock
func (MockSegmentStorage) SetChangeNumber ¶
func (m MockSegmentStorage) SetChangeNumber(segmentName string, till int64) error
SetChangeNumber mock
func (MockSegmentStorage) Update ¶
func (m MockSegmentStorage) Update(name string, toAdd *set.ThreadUnsafeSet, toRemove *set.ThreadUnsafeSet, changeNumber int64) error
Update mock
type MockSplitStorage ¶
type MockSplitStorage struct {
AllCall func() []dtos.SplitDTO
ChangeNumberCall func() (int64, error)
FetchManyCall func(splitNames []string) map[string]*dtos.SplitDTO
KillLocallyCall func(splitName string, defaultTreatment string, changeNumber int64)
PutManyCall func(splits []dtos.SplitDTO, changeNumber int64)
RemoveCall func(splitName string)
SegmentNamesCall func() *set.ThreadUnsafeSet
SetChangeNumberCall func(changeNumber int64) error
SplitCall func(splitName string) *dtos.SplitDTO
SplitNamesCall func() []string
TrafficTypeExistsCall func(trafficType string) bool
}
MockSplitStorage is a mocked implementation of Split Storage
func (MockSplitStorage) ChangeNumber ¶
func (m MockSplitStorage) ChangeNumber() (int64, error)
ChangeNumber mock
func (MockSplitStorage) FetchMany ¶
func (m MockSplitStorage) FetchMany(splitNames []string) map[string]*dtos.SplitDTO
FetchMany mock
func (MockSplitStorage) KillLocally ¶
func (m MockSplitStorage) KillLocally(splitName string, defaultTreatment string, changeNumber int64)
KillLocally mock
func (MockSplitStorage) PutMany ¶
func (m MockSplitStorage) PutMany(splits []dtos.SplitDTO, changeNumber int64)
PutMany mock
func (MockSplitStorage) SegmentNames ¶
func (m MockSplitStorage) SegmentNames() *set.ThreadUnsafeSet
SegmentNames mock
func (MockSplitStorage) SetChangeNumber ¶
func (m MockSplitStorage) SetChangeNumber(changeNumber int64) error
SetChangeNumber mock
func (MockSplitStorage) Split ¶
func (m MockSplitStorage) Split(splitName string) *dtos.SplitDTO
Split mock
func (MockSplitStorage) SplitNames ¶
func (m MockSplitStorage) SplitNames() []string
SplitNames mock
func (MockSplitStorage) TrafficTypeExists ¶
func (m MockSplitStorage) TrafficTypeExists(trafficType string) bool
TrafficTypeExists mock