Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dgryski/go-shardedkv
/ functions
Functions
142 in github.com/dgryski/go-shardedkv
⨍
Functions
142
◇
Types & classes
27
↓ 16 callers
Method
Get
Get returns the value for a given key and a bool indicating if the key was present
shardedkv.go:18
↓ 11 callers
Method
Choose
Choose returns a bucket for a given key
shardedkv.go:44
↓ 8 callers
Method
Delete
Delete removes a key from the storage, and returns a bool indicating if the key was found
shardedkv.go:22
↓ 8 callers
Method
Set
Set sets the value for key
shardedkv.go:20
↓ 7 callers
Method
SetBuckets
SetBuckets sets the list of known buckets from which the chooser should select
shardedkv.go:42
↓ 6 callers
Method
ResetConnection
ResetConnection reinitializes the connection for the shard responsible for a key
shardedkv.go:24
↓ 5 callers
Function
New
New returns a Storage that queries multiple replicas in parallel
storage/replica/replica.go:41
↓ 5 callers
Function
benchmarkOne
(b *testing.B, newch func() shardedkv.Chooser)
choosers/choosers_test.go:34
↓ 5 callers
Function
testDistribution
(t *testing.T, newch func() shardedkv.Chooser)
choosers/distrib_test.go:59
↓ 5 callers
Function
testOneDistribution
(t *testing.T, shards int, ch shardedkv.Chooser)
choosers/distrib_test.go:21
↓ 4 callers
Method
Add
Adds some keys to the hash.
choosers/chash/internal/consistenthash/consistenthash.go:49
↓ 4 callers
Function
checkMultiError
(t *testing.T, err error, what string)
storage/replica/replica_test.go:18
↓ 4 callers
Method
success
()
storage/backoff/backoff.go:120
↓ 3 callers
Method
Get
Get implements the shardedkv.Storage interface
storage/backoff/backoff.go:128
↓ 3 callers
Method
canUse
()
storage/backoff/backoff.go:57
↓ 3 callers
Method
fail
()
storage/backoff/backoff.go:83
↓ 2 callers
Method
AddShard
AddShard adds a shard from the list of known shards
shardedkv.go:180
↓ 2 callers
Method
IsEmpty
Returns true if there are no items available.
choosers/chash/internal/consistenthash/consistenthash.go:44
↓ 2 callers
Function
benchmarkChooser
(b *testing.B, shards int, ch shardedkv.Chooser)
choosers/choosers_test.go:18
↓ 1 callers
Method
BeginMigration
BeginMigration begins a continuum migration. All the shards in the new continuum must already be known to the KVStore via AddShard().
shardedkv.go:199
↓ 1 callers
Method
ChooseReplicas
(key string, n int)
choosers/jump/jump.go:27
↓ 1 callers
Method
DeleteShard
DeleteShard removes a shard from the list of known shards
shardedkv.go:189
↓ 1 callers
Method
EndMigration
EndMigration ends a continuum migration and marks the migration continuum as the new primary
shardedkv.go:229
↓ 1 callers
Method
GetMulti
Gets the closest item in the hash to the provided key, and following unique servers for replicas.
choosers/chash/internal/consistenthash/consistenthash.go:80
↓ 1 callers
Function
New
New returns a KVStore that uses chooser to shard the keys across the provided shards
shardedkv.go:56
↓ 1 callers
Function
New
New returns a new sql key-value store. Connector should be a function which returns an sql.DB object for the database where the table lives.
storage/sql/sql.go:34
↓ 1 callers
Function
New
New returns a new memory-backed Storage
storage/memory/memory.go:14
↓ 1 callers
Function
New
New returns a rest-backed storage at the given base URL using the default HTTP client
storage/rest/rest.go:17
↓ 1 callers
Function
New
New returns a new storage, backed by the redis server at 'addr'
storage/redis/redis.go:16
↓ 1 callers
Function
New
New returns a new Storage, storing files in 'dir'
storage/fs/fs.go:15
↓ 1 callers
Function
New
(h func([]byte) uint64)
choosers/jump/jump.go:11
↓ 1 callers
Function
NewWithClient
New returns a rest-backed storage at the given base URL using a custom HTTP client
storage/rest/rest.go:22
↓ 1 callers
Function
xorshiftMult64
64-bit xorshift multiply rng from http://vigna.di.unimi.it/ftp/papers/xorshift.pdf
choosers/jump/jump.go:59
Method
BeginMigrationWithShards
BeginMigrationWithShards begins a continuum migration using the new set of shards.
shardedkv.go:209
Function
BenchmarkCHash
(b *testing.B)
choosers/choosers_test.go:41
Function
BenchmarkJump
(b *testing.B)
choosers/choosers_test.go:45
Function
BenchmarkKetama
(b *testing.B)
choosers/choosers_test.go:40
Function
BenchmarkMaglev
(b *testing.B)
choosers/choosers_test.go:59
Function
BenchmarkMulti
(b *testing.B)
choosers/choosers_test.go:42
Function
BenchmarkRendezvous
(b *testing.B)
choosers/choosers_test.go:48
Method
Buckets
Buckets returns the list of known buckets
shardedkv.go:46
Method
Buckets
()
choosers/jump/jump.go:56
Method
Buckets
()
choosers/chash/chash.go:34
Method
Buckets
()
choosers/mpc/mpc.go:29
Method
Buckets
()
choosers/ketama/ketama.go:38
Method
Buckets
()
choosers/maglev/maglev.go:47
Method
Buckets
()
choosers/rendezvous/rdv.go:38
Method
Buckets
()
choosers/weighted/weighted.go:51
Method
Choose
(key string)
choosers/jump/jump.go:23
Method
Choose
(key string)
choosers/chash/chash.go:30
Method
Choose
(key string)
choosers/mpc/mpc.go:27
Method
Choose
(key string)
choosers/ketama/ketama.go:34
Method
Choose
(key string)
choosers/maglev/maglev.go:41
Method
Choose
(k string)
choosers/rendezvous/rdv.go:33
Method
Choose
(key string)
choosers/weighted/weighted.go:45
Method
ChooseReplicas
(key string, n int)
choosers/chash/chash.go:32
Method
ChooseReplicas
(key string, n int)
choosers/ketama/ketama.go:36
Method
Delete
Delete implements Storage.Delete()
shardedkv.go:123
Method
Delete
(key string)
storagetest/storagetest.go:16
Method
Delete
(key string)
storage/sql/sql.go:89
Method
Delete
(key string)
storage/memory/memory.go:37
Method
Delete
(key string)
storage/replica/replica_test.go:15
Method
Delete
(key string)
storage/replica/replica.go:182
Method
Delete
Delete implements the shardedkv.Storage interface
storage/backoff/backoff.go:168
Method
Delete
(key string)
storage/rest/rest.go:68
Method
Delete
(key string)
storage/redis/redis.go:45
Method
Delete
(key string)
storage/fs/fs.go:40
Method
Error
()
storage/replica/replica.go:24
Method
Error
()
storage/replica/replica.go:30
Method
Get
Get implements Storage.Get()
shardedkv.go:72
Method
Get
(key string)
storagetest/storagetest.go:12
Method
Get
(key string)
storage/sql/sql.go:48
Method
Get
(key string)
storage/memory/memory.go:20
Method
Get
(key string)
storage/replica/replica_test.go:13
Method
Get
(key string)
storage/replica/replica.go:49
Method
Get
(key string)
storage/rest/rest.go:29
Method
Get
(key string)
storage/redis/redis.go:27
Method
Get
(key string)
storage/fs/fs.go:21
Method
Get
Gets the closest item in the hash to the provided key.
choosers/chash/internal/consistenthash/consistenthash.go:61
Method
HedgedTimeout
HedgedTimeout returns the timeout for a single replica to respond before querying a backup. Defaults to 1 second.
storage/replica/replica.go:222
Function
New
()
choosers/chash/chash.go:13
Function
New
(replicas int, fn Hash)
choosers/chash/internal/consistenthash/consistenthash.go:34
Function
New
(hashf func(b []byte, seed uint64) uint64, seeds [2]uint64, k int)
choosers/mpc/mpc.go:17
Function
New
()
choosers/ketama/ketama.go:13
Function
New
()
choosers/maglev/maglev.go:16
Function
New
()
choosers/rendezvous/rdv.go:14
Function
New
(chooser shardedkv.Chooser, lookup func(string) int)
choosers/weighted/weighted.go:19
Method
ResetConnection
ResetConnection implements Storage.ResetConnection()
shardedkv.go:154
Method
ResetConnection
(key string)
storagetest/storagetest.go:17
Method
ResetConnection
(key string)
storage/sql/sql.go:109
Method
ResetConnection
(key string)
storage/memory/memory.go:51
Method
ResetConnection
(key string)
storage/replica/replica_test.go:16
Method
ResetConnection
(key string)
storage/replica/replica.go:202
Method
ResetConnection
ResetConnection implements the shardedkv.Storage interface
storage/backoff/backoff.go:188
Method
ResetConnection
(key string)
storage/rest/rest.go:92
Method
ResetConnection
(key string)
storage/redis/redis.go:51
Method
ResetConnection
(key string)
storage/fs/fs.go:55
Method
Set
Set implements Storage.Set()
shardedkv.go:103
Method
Set
(key string, val []byte)
storagetest/storagetest.go:15
Method
Set
(key string, val []byte)
storage/sql/sql.go:73
next →
1–100 of 142, ranked by callers