Documentation ¶
Overview ¶
Custom Core implementation for Cardinality Cube
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicSetCore ¶
type BasicSetCore struct {
// contains filtered or unexported fields
}
BasicSetCore is a very basic core that counts exact distinct items. There is no approximation in this approach but memory usage is inefficient.
func (BasicSetCore) Count ¶
func (b BasicSetCore) Count() uint64
Count returns item count in the set
func (BasicSetCore) Serialize ¶ added in v0.3.0
func (b BasicSetCore) Serialize() ([]byte, error)
type Core ¶
type Core interface { // Push adds item to store to count. Thread safe supplied by caller. Push(item []byte) // Count returns unique item count in the store. Not thread safe. Count() uint64 // Serialize core into bytes Serialize() ([]byte, error) }
Core is an abstraction of basic functionality of a Cube cell. Different implementations of a core result in different cubes.
type CoreInitiator ¶
CoreInitiator defines a function that initializes the cell core. The function will be called lazily whenever new cell is needed or at the deserialization phase. Use nil value for each argument to create new core with default options. If serializedBytes is not nil deserialization will be initiated.