Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadMagicNumber = errors.New("bad magic number") ErrUnknownRingVersion = errors.New("unknown ring version") )
Functions ¶
This section is empty.
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"` }
func ListLocalDevices ¶
type Ring ¶
type Ring interface { GetNodes(partition uint64) []*Device GetJobNodes(partition uint64, localDevice int) ([]*Device, bool) GetPartition(account string, container string, object string) uint64 LocalDevices(localPort int) ([]*Device, error) GetMoreNodes(partition uint64) MoreNodes ReplicaCount() (cnt uint64) PartitionCount() (cnt uint64) }
Click to show internal directories.
Click to hide internal directories.