Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PreSlotsManager ¶
type PreSlotsManager struct {
// contains filtered or unexported fields
}
PreSlotsManager will manage pre dispatch and sync to
func NewPreSlotsManager ¶
func NewPreSlotsManager(conn *zk.Conn) (PreSlotsManager, error)
NewPreSlotsManager will sync old data first
func (*PreSlotsManager) Commit ¶
func (psm *PreSlotsManager) Commit(begin uint32, end uint32, serviceName string) error
Commit will free segment
func (*PreSlotsManager) PreDispatch ¶
func (psm *PreSlotsManager) PreDispatch() (uint32, uint32, string, error)
PreDispatch will block new segment
type Scheduler ¶
type Scheduler interface { Schedule(registerName string, serviceName string) error Listen(string) error GetIdles() []interface{} GetIdle() interface{} }
Scheduler is a standard interface for zeus cammand
type SimpleScheduler ¶
type SimpleScheduler struct { ServiceHost *zroute.ServiceHost YurtPool mapset.Set // contains filtered or unexported fields }
SimpleScheduler is a simple algo for schedule idle yurt
func NewSimpleScheduler ¶
func NewSimpleScheduler(ctx context.Context, wg *sync.WaitGroup, conn *zk.Conn, minRequest int, ServiceHost *zroute.ServiceHost, sc *zslot.SlotCluster, segChannel chan zroute.Segment, psm *PreSlotsManager) (SimpleScheduler, error)
NewSimpleScheduler is a help function for new SimpleScheduler
func (*SimpleScheduler) GetIdle ¶
func (ss *SimpleScheduler) GetIdle() interface{}
func (*SimpleScheduler) GetIdles ¶
func (ss *SimpleScheduler) GetIdles() []interface{}
func (*SimpleScheduler) Listen ¶
func (ss *SimpleScheduler) Listen(path string) error
Listen will start a routine to ChildrenW now we just let idle into YurtPool
Click to show internal directories.
Click to hide internal directories.