kvx v0.1.0 KVX.Bucket.Shards

Shards adapter. This is the default adapter supported by KVX. Shards adapter only works with set and ordered_set table types.

Shards extra config options:

  • :shards_mod - internal Shards module to use. By default, :shards module is used, which is a wrapper on top of :shards_local and :shards_dist.

Run-time options when calling new/2 function, are the same as shards:new/2. For example:

MyModule.new(:mybucket, [n_shards: 4])

For more information about shards:

Summary

Functions

Callback implementation for KVX.Bucket.delete/2

Callback implementation for KVX.Bucket.flush!/1

Callback implementation for KVX.Bucket.get/2

Callback implementation for KVX.Bucket.mget/2

Callback implementation for KVX.Bucket.new/2

Functions

add(bucket, key, value, ttl \\ 300)

Callback implementation for KVX.Bucket.add/4.

delete(bucket, key)

Callback implementation for KVX.Bucket.delete/2.

find_all(bucket, query \\ nil)

Callback implementation for KVX.Bucket.find_all/2.

flush!(bucket)

Callback implementation for KVX.Bucket.flush!/1.

get(bucket, key)

Callback implementation for KVX.Bucket.get/2.

mget(bucket, keys)

Callback implementation for KVX.Bucket.mget/2.

mset(bucket, kv_pairs, ttl \\ 300)

Callback implementation for KVX.Bucket.mset/3.

new(bucket, opts \\ [])

Callback implementation for KVX.Bucket.new/2.

set(bucket, key, value, ttl \\ 300)

Callback implementation for KVX.Bucket.set/4.