cell

package
Version: v0.0.0-...-b6b8bdf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MigrateTimeoutSec  = 60
	BalanceCheckGapSec = 60
)

Variables

View Source
var MetaSlotSkeleton = "slot.load"

Functions

This section is empty.

Types

type NodeLoad

type NodeLoad struct {
	CurPower int32
	MaxPower int32
}

func (*NodeLoad) FreePower

func (this *NodeLoad) FreePower() int

type ResClass

type ResClass struct {
	Reses []ResDes
}

type ResDes

type ResDes struct {
	// contains filtered or unexported fields
}

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()

type SlotNode

type SlotNode struct {
	Power int
	Slot  int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL