Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Put(tab, key, value []byte) error Get(level rkvApi.ConsistencyLevel, tab, key []byte) ([]byte, error) Delete(tab, key []byte) error Batch([]*dbApi.BatchEntry) (interface{}, error) ApplyFuncRead(roLevel rkvApi.ConsistencyLevel, fn string, args ...[]byte) (interface{}, error) ApplyFuncWrite(fn string, args ...[]byte) (interface{}, error) dbApi.Closer }
Backend interface for disctributed database
type Cluster ¶
type Cluster interface { WaitForLeader(time.Duration) error IsLeader() bool Leader() (host, ip string) Servers() ([]*Server, error) Restarted() bool }
Cluster interface for distributed service
type Server ¶
type Server struct { ID string `json:"id"` IP string `json:"ip"` Host string `json:"host"` RaftPort string `json:"raft-port"` RPCPort string `json:"rpc-port"` HTTPBindAddr string `json:"http-bind-addr"` SerfBindAddr string `json:"serf-bind-addr"` IsLeader bool `json:"leader"` Online bool `json:"online"` IsLocal bool `json:"local"` }
Server describes cluster server
Click to show internal directories.
Click to hide internal directories.