Documentation ¶
Index ¶
- Constants
- func IsFullfilled(slots ...*Slots) bool
- type SlotAssignStatus
- type Slots
- func (s *Slots) Count(status SlotAssignStatus) (c int)
- func (s *Slots) Equals(old *Slots) bool
- func (s *Slots) Inter(n *Slots) *Slots
- func (s *Slots) IsFullfilled() bool
- func (s *Slots) IsImporting() bool
- func (s *Slots) IsMigration() bool
- func (s *Slots) IsSet(i int) bool
- func (s *Slots) Load(v interface{}) error
- func (s *Slots) MoveingStatus(i int) (SlotAssignStatus, string)
- func (s *Slots) Set(v interface{}, status SlotAssignStatus) error
- func (s *Slots) Slots(ss ...SlotAssignStatus) (ret []int)
- func (s *Slots) SlotsByStatus(status SlotAssignStatus) (ret []int)
- func (s *Slots) Status(i int) SlotAssignStatus
- func (s *Slots) String() string
- func (s *Slots) Sub(n *Slots) *Slots
- func (s *Slots) Union(slots ...*Slots) *Slots
Constants ¶
View Source
const (
RedisMaxSlots = 16384
)
Variables ¶
This section is empty.
Functions ¶
func IsFullfilled ¶
Types ¶
type SlotAssignStatus ¶
type SlotAssignStatus int
SlotAssignStatus slot assign status
const ( // SlotUnassigned - slot assigned SlotUnassigned SlotAssignStatus = 0 // SlotImporting - slot is in importing status SlotImporting SlotAssignStatus = 1 // SlotAssigned - slot is assigned SlotAssigned SlotAssignStatus = 2 // SlotMigrating - slot is in migrating status SlotMigrating SlotAssignStatus = 3 )
func NewSlotAssignStatusFromString ¶
func NewSlotAssignStatusFromString(v string) SlotAssignStatus
func (SlotAssignStatus) String ¶
func (s SlotAssignStatus) String() string
type Slots ¶
type Slots struct {
// contains filtered or unexported fields
}
func NewFullSlots ¶
func NewFullSlots() *Slots
func (*Slots) Count ¶
func (s *Slots) Count(status SlotAssignStatus) (c int)
func (*Slots) IsFullfilled ¶
IsFullfilled check if this slots if fullfilled
func (*Slots) IsImporting ¶
func (*Slots) IsMigration ¶
func (*Slots) MoveingStatus ¶
func (s *Slots) MoveingStatus(i int) (SlotAssignStatus, string)
func (*Slots) SlotsByStatus ¶
func (s *Slots) SlotsByStatus(status SlotAssignStatus) (ret []int)
SlotsByStatus
func (*Slots) Status ¶
func (s *Slots) Status(i int) SlotAssignStatus
Click to show internal directories.
Click to hide internal directories.