Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/buraksezer/consistent
/ functions
Functions
46 in github.com/buraksezer/consistent
⨍
Functions
46
◇
Types & classes
14
↓ 20 callers
Method
String
()
consistent.go:87
↓ 14 callers
Function
New
New creates and returns a new Consistent object.
consistent.go:123
↓ 10 callers
Method
Sum64
([]byte)
consistent.go:82
↓ 9 callers
Method
Add
Add adds a new member to the consistent hash circle.
consistent.go:244
↓ 9 callers
Function
newConfig
()
consistent_test.go:33
↓ 5 callers
Method
GetPartitionOwner
GetPartitionOwner returns the owner of the given partition.
consistent.go:310
↓ 5 callers
Method
LocateKey
LocateKey finds a home for given key
consistent.go:328
↓ 4 callers
Method
AverageLoad
AverageLoad exposes the current average load.
consistent.go:168
↓ 4 callers
Method
GetMembers
GetMembers returns a thread-safe copy of members. If there are no members, it returns an empty slice of Member.
consistent.go:155
↓ 3 callers
Method
FindPartitionID
FindPartitionID returns partition id for given key.
consistent.go:304
↓ 3 callers
Method
GetClosestN
GetClosestN returns the closest N member to a key in the hash ring. This may be useful to find members for replication.
consistent.go:384
↓ 3 callers
Method
distributePartitions
()
consistent.go:208
↓ 2 callers
Method
Remove
Remove removes a member from the consistent hash circle.
consistent.go:266
↓ 2 callers
Method
add
(member Member)
consistent.go:228
↓ 2 callers
Method
averageLoad
()
consistent.go:175
↓ 2 callers
Method
getClosestN
(partID, count int)
consistent.go:333
↓ 2 callers
Method
getPartitionOwner
getPartitionOwner returns the owner of the given partition. It's not thread-safe.
consistent.go:318
↓ 1 callers
Method
LoadDistribution
LoadDistribution exposes load distribution of members.
consistent.go:291
↓ 1 callers
Method
delSlice
(val uint64)
consistent.go:256
↓ 1 callers
Method
distributeWithLoad
(partID, idx int, partitions map[int]*Member, loads map[string]float64)
consistent.go:184
Function
BenchmarkAddRemove
(b *testing.B)
consistent_test.go:186
Function
BenchmarkGetClosestN
(b *testing.B)
consistent_test.go:209
Function
BenchmarkLocateKey
(b *testing.B)
consistent_test.go:197
Method
GetClosestNForPartition
GetClosestNForPartition returns the closest N member for given partition. This may be useful to find members for replication.
consistent.go:391
Method
String
()
consistent_test.go:44
Method
String
()
_examples/relocation_percentage.go:14
Method
String
()
_examples/add_and_list.go:12
Method
String
()
_examples/load_distribution.go:15
Method
String
()
_examples/sample.go:15
Method
Sum64
(data []byte)
consistent_test.go:50
Method
Sum64
(data []byte)
_examples/relocation_percentage.go:20
Method
Sum64
(data []byte)
_examples/add_and_list.go:18
Method
Sum64
(data []byte)
_examples/load_distribution.go:21
Method
Sum64
(data []byte)
_examples/sample.go:23
Function
TestConsistentAdd
(t *testing.T)
consistent_test.go:56
Function
TestConsistentClosestMembers
(t *testing.T)
consistent_test.go:161
Function
TestConsistentInsufficientMemberCount
(t *testing.T)
consistent_test.go:146
Function
TestConsistentLoad
(t *testing.T)
consistent_test.go:97
Function
TestConsistentLocateKey
(t *testing.T)
consistent_test.go:126
Function
TestConsistentRemove
(t *testing.T)
consistent_test.go:78
Function
init
()
_examples/relocation_percentage.go:24
Function
init
()
_examples/load_distribution.go:25
Function
main
()
_examples/relocation_percentage.go:28
Function
main
()
_examples/add_and_list.go:22
Function
main
()
_examples/load_distribution.go:29
Function
main
()
_examples/sample.go:28