Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cpuguy83/drax
/ functions
Functions
162 in github.com/cpuguy83/drax
⨍
Functions
162
◇
Types & classes
31
↓ 24 callers
Method
Put
(key string, value []byte, options *libkvstore.WriteOptions)
store.go:104
↓ 19 callers
Method
Encode
(interface{})
api/util.go:15
↓ 15 callers
Method
KVStore
KVStore provides access to the underlying KV store
cluster.go:142
↓ 14 callers
Method
Get
(key string)
store.go:87
↓ 13 callers
Function
newStore
()
store.go:83
↓ 12 callers
Method
IsLeader
()
store.go:31
↓ 11 callers
Method
newClient
()
store.go:78
↓ 9 callers
Method
Decode
(interface{})
api/util.go:10
↓ 8 callers
Method
do
(req *api.Request)
api/client/rpc.go:23
↓ 8 callers
Function
setError
(res *api.Response, err error)
api.go:287
↓ 6 callers
Method
Addr
Addr cluster is available on
cluster.go:189
↓ 6 callers
Method
Close
()
store.go:304
↓ 6 callers
Method
apply
(ax *api.Request)
store.go:308
↓ 5 callers
Method
Close
Close shuts down the stream layer
rpc/stream.go:100
↓ 5 callers
Method
Watch
(key string, stopCh <-chan struct{})
store.go:181
↓ 5 callers
Function
kvToLibKV
(kv *api.KVPair)
api/client/rpc.go:55
↓ 5 callers
Function
libkvToKV
(kv *libkvstore.KVPair)
api.go:265
↓ 4 callers
Method
Accept
Accept waits for and returns the next connection
rpc/stream.go:54
↓ 4 callers
Method
Addr
Addr returns the address the stremLayer is listening on This is used to satisfy the net.Listener interface
rpc/stream.go:116
↓ 4 callers
Method
Delete
(key string)
store.go:122
↓ 4 callers
Method
DialWithRetry
DialWithRetry is like `Dial` but uses a retry mechanism
rpc/stream.go:69
↓ 4 callers
Method
Peers
Peers returns the currnet list of raft peers
raft.go:134
↓ 4 callers
Method
Shutdown
Shutdown stops the local cluster node
cluster.go:127
↓ 4 callers
Method
get
(key string)
store.go:96
↓ 3 callers
Method
Apply
([]byte)
store.go:35
↓ 3 callers
Method
Close
Close shutsdown the raft for the local node
raft.go:83
↓ 3 callers
Method
Close
Close closes the underlying stream layer
api/client/client.go:242
↓ 3 callers
Method
DeleteTree
(dir string)
store.go:169
↓ 3 callers
Method
Leader
Leader returns the current leader
raft.go:154
↓ 3 callers
Method
LeaderCh
()
store.go:32
↓ 3 callers
Method
List
(prefix string)
store.go:145
↓ 3 callers
Method
Publish
(kv *libkvstore.KVPair)
store.go:540
↓ 3 callers
Method
ShutdownCh
()
store.go:34
↓ 3 callers
Function
cleanupNodes
(nodes []*Cluster)
cluster_test.go:123
↓ 3 callers
Function
cleanupNodes
(nodes []*drax.Cluster)
integration/utils.go:47
↓ 3 callers
Function
newTestCluster
(size int, prefixAddr string)
cluster_test.go:93
↓ 3 callers
Function
newTestCluster
(size int, prefixAddr string)
integration/utils.go:17
↓ 2 callers
Method
Exists
(key string)
store.go:135
↓ 2 callers
Method
GetLeader
()
store.go:33
↓ 2 callers
Method
RPC
RPC is a helper function for performing RPC requests between nodes
rpc/stream.go:121
↓ 2 callers
Method
Subscribe
()
store.go:493
↓ 2 callers
Method
Subscribe
()
store.go:532
↓ 2 callers
Method
WatchTree
(dir string, stopCh <-chan struct{})
store.go:206
↓ 2 callers
Method
closeWatches
(key string)
store.go:469
↓ 2 callers
Method
dial
()
api/client/rpc.go:19
↓ 2 callers
Function
kvToLibKV
(kv *api.KVPair)
api.go:276
↓ 2 callers
Function
libkvToKV
(kv *store.KVPair)
api/client/rpc.go:63
↓ 2 callers
Function
newDB
()
store.go:74
↓ 2 callers
Function
newPeerStore
(home string, transport raft.Transport)
discovery.go:20
↓ 2 callers
Function
newTestHandler
(addr net.Addr, msgType byte)
rpc/server_test.go:60
↓ 2 callers
Method
stream
(req *api.Request)
api/client/rpc.go:44
↓ 2 callers
Function
waitClose
(conn io.Reader, chStop chan struct{})
api.go:101
↓ 2 callers
Method
waitLeader
()
raft.go:158
↓ 2 callers
Method
waitLeader
()
cluster.go:156
↓ 1 callers
Method
AddPeer
AddPeer adds the given peer to the raft cluster
raft.go:124
↓ 1 callers
Function
Decode
Decode should be used to decode anything sent to or use by the cluster
api/util.go:24
↓ 1 callers
Method
Dial
Dial is used by Raft for RPC
rpc/stream.go:64
↓ 1 callers
Function
Encode
Encode should be used to encode anything sent to or use by the cluster
api/util.go:19
↓ 1 callers
Method
Errors
Errors returns a channel receiver that callers can use to listen for cluster errors
cluster.go:152
↓ 1 callers
Method
Evict
(s chan []*libkvstore.KVPair)
store.go:525
↓ 1 callers
Method
Evict
(s chan *libkvstore.KVPair)
store.go:564
↓ 1 callers
Method
Handoff
(net.Conn)
rpc/server.go:8
↓ 1 callers
Method
Home
Home is the home path where the cluster state is stored
cluster.go:194
↓ 1 callers
Method
IsLeader
IsLeader returns whether this node is the raft leader
raft.go:119
↓ 1 callers
Function
New
New creates a new Cluster and starts it
cluster.go:40
↓ 1 callers
Function
NewServer
NewServer creates a new RPC server
rpc/server.go:30
↓ 1 callers
Function
NewStreamLayer
NewStreamLayer creates a new StreamLayer `addr` is used so this can implement the net.Listener interface `rpcType` is the type of Message this StreamL
rpc/stream.go:38
↓ 1 callers
Method
ProxyRequest
ProxyRequest is a helper function to proxy an rpc request to another node
rpc/stream.go:138
↓ 1 callers
Method
RemovePeer
RemovePeer removes the given peer from the raft cluster
raft.go:129
↓ 1 callers
Method
SetPeers
SetPeers sets the list of raft peers
raft.go:139
↓ 1 callers
Function
abort
(start time.Time, timeOff, max time.Duration)
rpc/stream.go:176
↓ 1 callers
Function
backoff
(retries int)
rpc/stream.go:164
↓ 1 callers
Method
checkTreeWatches
(key string, kv []*libkvstore.KVPair)
store.go:457
↓ 1 callers
Method
checkWatches
(key string, kv *libkvstore.KVPair)
store.go:443
↓ 1 callers
Function
getErr
(e *errcode.Error)
api/client/rpc.go:74
↓ 1 callers
Method
handleConn
(conn net.Conn)
api.go:49
↓ 1 callers
Method
handleConn
(conn net.Conn)
api.go:224
↓ 1 callers
Method
handleConn
(conn net.Conn)
rpc/server.go:47
↓ 1 callers
Method
handleConns
()
api.go:35
↓ 1 callers
Method
handleConns
()
api.go:205
↓ 1 callers
Method
handleConns
()
rpc/server_test.go:19
↓ 1 callers
Method
handleLeader
(leaderCh <-chan interface{})
store.go:337
↓ 1 callers
Method
handleLeader
(leaderCh <-chan interface{})
cluster.go:171
↓ 1 callers
Method
listen
listen tells the RPC server to start handling incoming connections
rpc/server.go:37
↓ 1 callers
Function
newRaft
(home, addr string, peerStore *peerStoreWrapper, fsm raft.FSM, trans *raft.NetworkTransport, cfg *raft.Config)
raft.go:34
↓ 1 callers
Method
reapKeys
(keys []string)
store.go:365
↓ 1 callers
Method
start
()
cluster.go:58
↓ 1 callers
Function
ttlDue
(t *ttl)
store.go:374
Method
Apply
Apply applies the bytes to the raft log If this is not the leader node, the request is sent to the leader
raft.go:95
Method
Apply
(l *raft.Log)
store.go:381
Method
Apply
(b []byte)
store_test.go:35
Method
AtomicDelete
(conn io.Writer, req *clientRequest)
api.go:195
Method
AtomicDelete
(key string, previous *libkvstore.KVPair)
store.go:275
Method
AtomicDelete
AtomicDelete is like `Delete`, but makes sure the key is not changed while performing the action.
api/client/client.go:227
Method
AtomicPut
(conn io.Writer, req *clientRequest)
api.go:183
Method
AtomicPut
(key string, value []byte, previous *libkvstore.KVPair, options *libkvstore.WriteOptions)
store.go:238
Method
AtomicPut
AtomicPut is like `Put`, but ensures there are no changes to the key while the action is performed If the key is changed, this returns an error and do
api/client/client.go:208
Function
BenchmarkDecode
(b *testing.B)
api/api_test.go:24
Function
BenchmarkEncode
(b *testing.B)
api/api_test.go:9
Method
Close
()
store.go:571
next →
1–100 of 162, ranked by callers