Documentation ¶
Index ¶
- Variables
- type NodeData
- type SystemicDB
- func (t *SystemicDB) Exists(keyStr string) bool
- func (t *SystemicDB) Get(keyStr string) *NodeData
- func (t *SystemicDB) GetCollectionCycleCount() *int64
- func (t *SystemicDB) Insert(keyStr string, value []byte, expiry time.Duration) *node
- func (t *SystemicDB) IsBalanced() bool
- func (t *SystemicDB) Max() uint64
- func (t *SystemicDB) Min() uint64
- func (t *SystemicDB) Remove(keyStr string)
Constants ¶
This section is empty.
Variables ¶
var ExpiredCollectionCycles int64
Functions ¶
This section is empty.
Types ¶
type SystemicDB ¶ added in v0.0.2
type SystemicDB struct { Meta sdbMeta // contains filtered or unexported fields }
func NewSystemicDB ¶
func NewSystemicDB() *SystemicDB
NewSystemicDB simply creates a new instance of the SystemicDB AVL Tree, starts the expired garbage collector and returns a pointer
func (*SystemicDB) Exists ¶ added in v0.0.2
func (t *SystemicDB) Exists(keyStr string) bool
Exists searches for an element in the AVL Tree and return a bool (true is exists)
func (*SystemicDB) Get ¶ added in v0.0.2
func (t *SystemicDB) Get(keyStr string) *NodeData
Get searches for an element in the AVL Tree and returns a NodeData struct which is important parts of the node that a user could need
func (*SystemicDB) GetCollectionCycleCount ¶ added in v0.0.2
func (t *SystemicDB) GetCollectionCycleCount() *int64
GetCollectionCycleCount returns a int64 of a count of how many times the expiredGC has run, this is used for testing
func (*SystemicDB) Insert ¶ added in v0.0.2
func (t *SystemicDB) Insert(keyStr string, value []byte, expiry time.Duration) *node
Insert inserts an element into the AVL Tree and returns the newly created node (includes a rebalance of the tree)
func (*SystemicDB) IsBalanced ¶ added in v0.0.2
func (t *SystemicDB) IsBalanced() bool
IsBalanced returns true if the AVL Tree is balanced.
func (*SystemicDB) Max ¶ added in v0.0.2
func (t *SystemicDB) Max() uint64
Max returns the maximum element in the AVL Tree.
func (*SystemicDB) Min ¶ added in v0.0.2
func (t *SystemicDB) Min() uint64
Min returns the minimum element in the AVL Tree.
func (*SystemicDB) Remove ¶ added in v0.0.2
func (t *SystemicDB) Remove(keyStr string)
Remove removes an element from the AVL Tree (includes a rebalance of the tree)