Documentation
¶
Index ¶
- Constants
- Variables
- type NodeLoad
- type ResClass
- type ResDes
- type SlotGroupSkeleton
- func (this *SlotGroupSkeleton) BalanceCheck(ress []ResClass) [][]int64
- func (this *SlotGroupSkeleton) BeanStart()
- func (this *SlotGroupSkeleton) BeanStop()
- func (this *SlotGroupSkeleton) FinishMigrateOutSlot(slot int)
- func (this *SlotGroupSkeleton) GetMigrateOutSlot() int
- func (this *SlotGroupSkeleton) GetResSlot(resid int64) int
- func (this *SlotGroupSkeleton) GoStart()
- func (this *SlotGroupSkeleton) IsMgrRes(resid int64) bool
- func (this *SlotGroupSkeleton) RaceSlot()
- type SlotGroupStub
- type SlotNode
Constants ¶
View Source
const ( MigrateTimeoutSec = 60 BalanceCheckGapSec = 60 )
Variables ¶
View Source
var MetaSlotSkeleton = "slot.load"
Functions ¶
This section is empty.
Types ¶
type SlotGroupSkeleton ¶
type SlotGroupSkeleton struct { gioc.IConfigBase *SlotGroupStub // contains filtered or unexported fields }
func NewSlotGroupSkeleton ¶
func NewSlotGroupSkeleton(cfgBase string) *SlotGroupSkeleton
func (*SlotGroupSkeleton) BalanceCheck ¶
func (this *SlotGroupSkeleton) BalanceCheck(ress []ResClass) [][]int64
如果超载,并且有节点可以接受,则开始进行负载均衡
func (*SlotGroupSkeleton) BeanStart ¶
func (this *SlotGroupSkeleton) BeanStart()
func (*SlotGroupSkeleton) BeanStop ¶
func (this *SlotGroupSkeleton) BeanStop()
func (*SlotGroupSkeleton) FinishMigrateOutSlot ¶
func (this *SlotGroupSkeleton) FinishMigrateOutSlot(slot int)
func (*SlotGroupSkeleton) GetMigrateOutSlot ¶
func (this *SlotGroupSkeleton) GetMigrateOutSlot() int
func (*SlotGroupSkeleton) GetResSlot ¶
func (this *SlotGroupSkeleton) GetResSlot(resid int64) int
func (*SlotGroupSkeleton) GoStart ¶
func (this *SlotGroupSkeleton) GoStart()
func (*SlotGroupSkeleton) IsMgrRes ¶
func (this *SlotGroupSkeleton) IsMgrRes(resid int64) bool
func (*SlotGroupSkeleton) RaceSlot ¶
func (this *SlotGroupSkeleton) RaceSlot()
type SlotGroupStub ¶
type SlotGroupStub struct { gioc.IConfigBase // contains filtered or unexported fields }
func NewSlotGroupStub ¶
func NewSlotGroupStub(cfgBase string, optSlotSize *gredis.BoundValueOperation, optSlotVersion *gredis.BoundValueOperation, optSlots *gredis.BoundHashOperation, fastProcessGapSec int, slowProcessGapSec int) *SlotGroupStub
func (*SlotGroupStub) BeanStart ¶
func (this *SlotGroupStub) BeanStart()
func (*SlotGroupStub) BeanStop ¶
func (this *SlotGroupStub) BeanStop()
func (*SlotGroupStub) GetResUuid ¶
func (this *SlotGroupStub) GetResUuid(resid int64) string
func (*SlotGroupStub) GoStart ¶
func (this *SlotGroupStub) GoStart()