Documentation
¶
Index ¶
Constants ¶
const MaxRetriesToCreateDB = 10
MaxRetriesToCreateDB represents the maximum number of times to try to create DB if it failed
const SleepTimeBetweenCreateDBRetries = 5 * time.Second
SleepTimeBetweenCreateDBRetries represents the number of seconds to sleep between DB creates
Variables ¶
var ErrCacheCapacityInvalid = errors.New("cache capacity is less than 1")
ErrCacheCapacityInvalid signals that capacity of cache is less than 1
var ErrCacheSizeInvalid = errors.New("cache size is less than 1")
ErrCacheSizeInvalid signals that size of cache is less than 1
var ErrCacheSizeIsLowerThanBatchSize = errors.New("cache size is lower than batch size")
ErrCacheSizeIsLowerThanBatchSize signals that size of cache is lower than size of batch
var ErrDBIsClosed = core.ErrDBIsClosed
ErrDBIsClosed is raised when the DB is closed
var ErrEmptyKey = errors.New("key is empty")
ErrEmptyKey is raised when a key is empty
var ErrFailedCacheEviction = errors.New("failed eviction within cache")
ErrFailedCacheEviction signals a failed eviction within a cache
var ErrImmuneItemsCapacityReached = errors.New("capacity reached for immune items")
ErrImmuneItemsCapacityReached signals that capacity for immune items is reached
var ErrInvalidBatch = errors.New("batch is invalid")
ErrInvalidBatch is raised when the used batch is invalid
var ErrInvalidCacheExpiry = errors.New("invalid cache expiry")
ErrInvalidCacheExpiry signals that an invalid cache expiry was provided
var ErrInvalidConfig = errors.New("invalid config")
ErrInvalidConfig signals an invalid config
var ErrInvalidDefaultSpan = errors.New("invalid default span")
ErrInvalidDefaultSpan signals that an invalid default span was provided
var ErrInvalidNumOpenFiles = errors.New("maxOpenFiles is invalid")
ErrInvalidNumOpenFiles is raised when the max num of open files is less than 1
var ErrKeyNotFound = errors.New("key not found")
ErrKeyNotFound is raised when a key is not found
var ErrLRUCacheInvalidSize = errors.New("wrong size in bytes value for LRU cache")
ErrLRUCacheInvalidSize signals that the provided size in bytes value for LRU cache is invalid
var ErrLRUCacheWithProvidedSize = errors.New("LRU cache does not support size in bytes")
ErrLRUCacheWithProvidedSize signals that a simple LRU cache is wanted but the user provided a positive size in bytes value
var ErrNegativeSizeInBytes = errors.New("negative size in bytes")
ErrNegativeSizeInBytes signals that the provided size in bytes value is negative
var ErrNilCacher = errors.New("expected not nil cacher")
ErrNilCacher is raised when a nil cacher is provided
var ErrNilMarshalizer = errors.New("nil marshalizer")
ErrNilMarshalizer signals that a nil marshalizer has been provided
var ErrNilPersister = errors.New("expected not nil persister")
ErrNilPersister is raised when a nil persister is provided
var ErrNilStoredDataFactory = errors.New("nil stored data factory")
ErrNilStoredDataFactory signals that a nil stored data factory has been provided
var ErrNilTimeCache = errors.New("nil time cache")
ErrNilTimeCache signals that a nil time cache has been provided
var ErrNotSupportedCacheType = errors.New("not supported cache type")
ErrNotSupportedCacheType is raised when an unsupported cache type is provided
var ErrNotSupportedDBType = errors.New("not supported db type")
ErrNotSupportedDBType is raised when an unsupported database type is provided
var ErrNotSupportedHashType = errors.New("hash type not supported")
ErrNotSupportedHashType is raised when an unsupported hasher is provided
var ErrOldestEpochNotAvailable = errors.New("oldest epoch not available")
ErrOldestEpochNotAvailable signals that fetching the oldest epoch is not available
Functions ¶
This section is empty.
Types ¶
type CacheConfig ¶ added in v1.0.16
type CacheConfig struct { Name string Type CacheType SizeInBytes uint64 SizeInBytesPerSender uint32 Capacity uint32 SizePerSender uint32 Shards uint32 }
CacheConfig holds the configurable elements of a cache
func (*CacheConfig) String ¶ added in v1.0.16
func (config *CacheConfig) String() string
String returns a readable representation of the object
type CacheType ¶ added in v1.0.16
type CacheType string
CacheType represents the type of the supported caches
type DBConfig ¶ added in v1.0.16
type DBConfig struct { FilePath string Type DBType BatchDelaySeconds int MaxBatchSize int MaxOpenFiles int }
DBConfig holds the configurable elements of a database
type DBType ¶ added in v1.0.16
type DBType string
DBType represents the type of the supported databases
type ShardIDProviderType ¶ added in v1.0.16
type ShardIDProviderType string
ShardIDProviderType represents the type for the supported shard id provider
const (
BinarySplit ShardIDProviderType = "BinarySplit"
)
Shard id provider types that are currently supported