Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/YuriyNasretdinov/distribkv
/ functions
Functions
43 in github.com/YuriyNasretdinov/distribkv
⨍
Functions
43
◇
Types & classes
7
↓ 5 callers
Method
GetKey
GetKey get the value of the requested from a default database.
db/db.go:122
↓ 4 callers
Method
SetKey
SetKey sets the key to the requested value into the default database or returns an error.
db/db.go:51
↓ 4 callers
Function
createTempDb
(t *testing.T, readOnly bool)
db/db_test.go:12
↓ 3 callers
Method
GetNextKeyForReplication
GetNextKeyForReplication returns the key and value for the keys that have changed and have not yet been applied to replicas. If there are no new keys,
db/db.go:86
↓ 3 callers
Method
Index
Index returns the shard number for the corresponding key.
config/config.go:78
↓ 3 callers
Function
copyByteSlice
(b []byte)
db/db.go:74
↓ 3 callers
Function
setKey
(t *testing.T, d *db.Database, key, value string)
db/db_test.go:98
↓ 2 callers
Method
DeleteExtraKeys
DeleteExtraKeys deletes the keys that do not belong to this shard.
db/db.go:137
↓ 2 callers
Method
DeleteReplicationKey
DeleteReplicationKey deletes the key from the replication queue if the value matches the contents or if the key is already absent.
db/db.go:104
↓ 2 callers
Function
benchmark
(name string, iter int, fn func() string)
cmd/bench/main.go:32
↓ 2 callers
Function
benchmarkWrite
()
cmd/bench/main.go:91
↓ 2 callers
Function
createConfig
(t *testing.T, contents string)
config/config_test.go:12
↓ 2 callers
Function
createShardServer
(t *testing.T, idx int, addrs map[int]string)
web/web_test.go:42
↓ 2 callers
Function
getKey
(t *testing.T, d *db.Database, key string)
db/db_test.go:106
↓ 2 callers
Method
redirect
(shard int, w http.ResponseWriter, r *http.Request)
web/web.go:28
↓ 1 callers
Method
SetKeyOnReplica
SetKeyOnReplica sets the key to the requested value into the default database and does not write to the replication queue. This method is intended to
db/db.go:68
↓ 1 callers
Function
benchmarkRead
(allKeys []string)
cmd/bench/main.go:116
↓ 1 callers
Method
createBuckets
()
db/db.go:38
↓ 1 callers
Function
createShardDb
(t *testing.T, idx int)
web/web_test.go:20
↓ 1 callers
Method
deleteFromReplicationQueue
(key, value string)
replication/replication.go:76
↓ 1 callers
Method
loop
()
replication/replication.go:45
↓ 1 callers
Function
parseFlags
()
main.go:22
↓ 1 callers
Function
readRand
(allKeys []string)
cmd/bench/main.go:75
Function
ClientLoop
ClientLoop continuously downloads new keys from the master and applies them.
replication/replication.go:29
Method
DeleteExtraKeysHandler
DeleteExtraKeysHandler deletes keys that don't belong to the current shard.
web/web.go:77
Method
DeleteReplicationKey
DeleteReplicationKey deletes the key from replica queue.
web/web.go:95
Method
GetHandler
GetHandler handles read requests from the database.
web/web.go:44
Method
GetNextKeyForReplication
GetNextKeyForReplication returns the next key for replication.
web/web.go:84
Function
NewDatabase
NewDatabase returns an instance of a database that we can work with.
db/db.go:21
Function
NewServer
NewServer creates a new instance with HTTP handlers to be used to get and set values.
web/web.go:21
Function
ParseFile
ParseFile parses the config and returns it upon success.
config/config.go:24
Function
ParseShards
ParseShards converts and verifies the list of shards specified in the config into a form that can be used for routing.
config/config.go:44
Method
SetHandler
SetHandler handles write requests from the database.
web/web.go:61
Function
TestConfigParse
(t *testing.T)
config/config_test.go:37
Function
TestDeleteExtraKeys
(t *testing.T)
db/db_test.go:117
Function
TestDeleteReplicationKey
(t *testing.T)
db/db_test.go:58
Function
TestGetSet
(t *testing.T)
db/db_test.go:32
Function
TestParseShards
(t *testing.T)
config/config_test.go:58
Function
TestSetReadOnly
(t *testing.T)
db/db_test.go:90
Function
TestWebServer
(t *testing.T)
web/web_test.go:57
Function
main
()
main.go:34
Function
main
()
cmd/bench/main.go:138
Function
writeRand
()
cmd/bench/main.go:56