Versions in this module Expand all Collapse all v0 v0.9.4 Apr 3, 2020 v0.9.3 Apr 1, 2020 Changes in this version type InstanceInfo + func (ii *InstanceInfo) AddrValid() bool v0.9.2 Feb 14, 2020 v0.9.0 Dec 19, 2018 Changes in this version + const MasterOnlyKey + const NumSlots + func BatchKey(reqs []redis.Request) (string, bool) + func BatchSlot(reqs []redis.Request) (uint16, bool) + func CRC16(buf []byte) uint16 + func ParseMasterOnly(resp interface{}) (set map[uint16]struct{}, valid bool, err error) + func ReqSlot(req redis.Request) (uint16, bool) + func RequestMasterOnly(c redis.Sender, key string) (set map[uint16]struct{}, valid bool, err error) + func Resolve(addr string) (string, error) + func SetMasterOnly(c redis.Sender, key string, slots []uint16) error + func Slot(key string) uint16 + func UnsetMasterOnly(c redis.Sender, key string, slots []uint16) error + type InstanceInfo struct + Addr string + Fail bool + IP string + Migrating []SlotMigration + MySelf bool + NoAddr bool + Port int + Port2 int + SlaveOf string + Slots [][2]uint16 + Uuid string + func (ii *InstanceInfo) HasAddr() bool + func (ii *InstanceInfo) IsMaster() bool + type InstanceInfos []InstanceInfo + func ParseClusterNodes(res interface{}) (InstanceInfos, error) + func (iis InstanceInfos) CollectAddressesAndMigrations(addrs map[string]struct{}, migrating map[uint16]struct{}) + func (iis InstanceInfos) HashSum() uint64 + func (iis InstanceInfos) Hosts() []string + func (iis InstanceInfos) MergeWith(other InstanceInfos) InstanceInfos + func (iis InstanceInfos) MySelf() *InstanceInfo + func (iis InstanceInfos) SlotsRanges() []SlotsRange + type SlotMigration struct + Moving SlotMoving + Number uint16 + Peer string + type SlotMoving byte + const SlotImporting + const SlotMigrating + type SlotsRange struct + Addrs []string + From int + To int + func ParseSlotsInfo(res interface{}) ([]SlotsRange, error)