sharded

package
v0.0.0-...-cacfd1a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

package sharded implements a memcache client that shards 2 or more memcache servers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type ShardedClient

type ShardedClient struct {
	// contains filtered or unexported fields
}

func (*ShardedClient) Add

func (c *ShardedClient) Add(item *memcache.Item) error

func (*ShardedClient) Decrement

func (c *ShardedClient) Decrement(key string, delta uint64) (newValue uint64, err error)

func (*ShardedClient) Delete

func (c *ShardedClient) Delete(key string) error

func (*ShardedClient) DeleteAll

func (c *ShardedClient) DeleteAll() error

func (*ShardedClient) Finalize

func (c *ShardedClient) Finalize()

func (*ShardedClient) Get

func (c *ShardedClient) Get(key string) (item *memcache.Item, err error)

func (*ShardedClient) GetMulti

func (c *ShardedClient) GetMulti(keys []string) (map[string]*memcache.Item, error)

func (*ShardedClient) GetMultiArray

func (c *ShardedClient) GetMultiArray(keys []string) ([]*memcache.Item, error)

func (*ShardedClient) Increment

func (c *ShardedClient) Increment(key string, delta uint64) (newValue uint64, err error)

func (*ShardedClient) Replace

func (c *ShardedClient) Replace(item *memcache.Item) error

func (*ShardedClient) SendProxiedMessageAsync

func (c *ShardedClient) SendProxiedMessageAsync(command *message.SingleMessage)

func (*ShardedClient) Set

func (c *ShardedClient) Set(item *memcache.Item) error

func (*ShardedClient) Touch

func (c *ShardedClient) Touch(key string, seconds int32) error

Directories

Path Synopsis
Package distribution implements distributions such as consistent hashing compatible with twemproxy (hopefully) This implementation draws from the Daisuke Maki's Perl module, which itself is based on the original libketama code.
Package distribution implements distributions such as consistent hashing compatible with twemproxy (hopefully) This implementation draws from the Daisuke Maki's Perl module, which itself is based on the original libketama code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL