Documentation ¶
Overview ¶
Graph-like operations on top of storage
The package is in work-in-progress status.
Classical data structure where each node (element) addressed by unique key (id) and should have only one value and multiple links: keys of another nodes. Such data structure should well reflect real world relationship like so: social network (person can have friends), users accounts (several accounts for one user) and so on.
NODE NODE +--------+ +--------+ node id | key | +------> | key | +--------+ | | .... | payload | value | | +--------+ +--------+ | | key0 | ---+ links | key1 | | ... | +--------+
Graph may contain only forward link as well as backwards links also. It depends of implementation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Node ¶
type Node interface { // node payload Data() ([]byte, error) // node id (key) Key() NodeKey // list of linked keys to the node Linked() ([]NodeKey, error) // update node payload SetData(value []byte) error // update node links SetLinked(keys []NodeKey) error // open another node by key using current node implementation of graph Open(key NodeKey) Node }
Click to show internal directories.
Click to hide internal directories.