Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dcron ¶
type Dcron struct {
// contains filtered or unexported fields
}
Dcron is main struct
type JobWarpper ¶
type JobWarpper struct { ID cron.EntryID Dcron *Dcron Name string CronStr string Func func() Job Job }
JobWarpper is a job warpper
type NodePool ¶
type NodePool struct { NodeID string Driver driver.Driver // contains filtered or unexported fields }
NodePool is a node pool
func (*NodePool) InitPoolGrabService ¶
func (np *NodePool) InitPoolGrabService()
func (*NodePool) PickNodeByJobName ¶
PickNodeByJobName : 使用一致性hash算法根据任务名获取一个执行节点
func (*NodePool) SetInterval ¶
SetInterval set interval time
type PoolOptions ¶
type PoolOptions struct { Replicas int HashFn consistenthash.Hash }
PoolOptions is a pool options
Click to show internal directories.
Click to hide internal directories.