Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Disconnected = fmt.Errorf("Disconnected from memcache server") CacheMiss = fmt.Errorf("Server cache miss") )
Functions ¶
func NewMemcacheRing ¶
Types ¶
type Device ¶
type Device struct { Id int `json:"id"` Device string `json:"device"` Ip string `json:"ip"` Meta string `json:"meta"` Port int `json:"port"` Region int `json:"region"` ReplicationIp string `json:"replication_ip"` ReplicationPort int `json:"replication_port"` Weight float64 `json:"weight"` Zone int `json:"zone"` }
type MemcacheRing ¶
type MemcacheRing interface { Decr(key string, delta int64, timeout int) (int64, error) Delete(key string) error Get(key string) (interface{}, error) GetStructured(key string, val interface{}) error GetMulti(serverKey string, keys []string) (map[string]interface{}, error) Incr(key string, delta int64, timeout int) (int64, error) Set(key string, value interface{}, timeout int) error SetMulti(serverKey string, values map[string]interface{}, timeout int) error }
type Ring ¶
type Ring interface { GetNodes(partition uint64) (response []*Device) GetNodesInOrder(partition uint64) (response []*Device) GetJobNodes(partition uint64, localDevice int) (response []*Device, handoff bool) GetPartition(account string, container string, object string) uint64 LocalDevices(localPort int) (devs []*Device, err error) AllDevices() (devs []Device) GetMoreNodes(partition uint64) MoreNodes ReplicaCount() (cnt uint64) PartitionCount() (cnt uint64) }
Click to show internal directories.
Click to hide internal directories.