Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type OperationType ¶
type OperationType string
const ( OperationInsert OperationType = "insert" OperationDelete OperationType = "delete" OperationUpdate OperationType = "update" OperationUpdateLocation OperationType = "updateloc" OperationUpdateData OperationType = "updatedata" )
type Store ¶
type Store interface { Open(enableSingle bool, localID string) error Get(key string) (ds.QuadTreeLeaf, error) Insert(locationID string, position ds.GeoLocation, data map[string]interface{}) error Update(locationID string, position ds.GeoLocation, data map[string]interface{}) error UpdateLocation(locationID string, position ds.GeoLocation) error UpdateData(locationID string, data map[string]interface{}) error Delete(key string) error BulkWrite(commands []Command) error // Join joins the node, identitifed by nodeID and reachable at addr, to the cluster. Join(nodeID string, addr string) error GetLeader() raft.ServerAddress GetNeighbors(ds.Position, int, int) []ds.QuadTreeNeighborResult Remove(nodeId string) error Nodes() ([]*Server, error) IsLeader() bool }
Store is the interface Raft-backed key-value stores must implement.
Click to show internal directories.
Click to hide internal directories.