Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Statistics ¶
type Statistics struct { LastFetchTime int64 SelectCount int64 SelectItemCount int64 OtherCompareCount int64 ExecuteSuccCount int64 // concurrent ExecuteFailCount int64 // concurrent ExecuteSpendTime int64 // concurrent }
func (*Statistics) Execute ¶
func (s *Statistics) Execute(succ bool, cost int64)
func (*Statistics) Select ¶
func (s *Statistics) Select(cnt int64)
type Strategy ¶
type Strategy struct { ID string IPList []string // Which can be scheduled on MaxOnSingleScheduler int // Max workers can be created on the same scheduler Total int // Total workers should be created Kind StrategyKind Bind string // resource name or type name to bind, cooperate with Kind Parameter string Enabled bool // Whether it should begin to schedule // format 0 * * * * ? // sec min hour day month week CronBegin, CronEnd string // Interval for FuncWorker Extra map[string]string }
type StrategyKind ¶
type StrategyKind int
const ( UnknownKind StrategyKind = iota SimpleKind FuncKind TaskKind )
type StrategyRuntime ¶
type StrategyRuntime struct { SchedulerID string StrategyID string CreateAt int64 Num int RequestedNum int }
func (*StrategyRuntime) String ¶
func (s *StrategyRuntime) String() string
type Task ¶
type Task struct { ID string IntervalNoData int // Whether to delay specified time (millis) if no data selected Interval int // Whether to delay specified time (millis) if something are selected out FetchCount int BatchCount int // If implement TaskBatch the maximum tasks in one call ExecutorCount int // 1 selector -> N executor(s) Model Model Parameter string // Parameter of task Bind string // Bond to registry Items []TaskItem MaxTaskItems int // max task items per Worker // Interval of heartbeat, in millis HeartbeatInterval int // Timeout to be death, in millis DeathTimeout int }
type TaskAssignment ¶
type TaskAssignment struct { StrategyID string TaskID string ItemID string RuntimeID string RequestedRuntimeID string Parameter string }
func (*TaskAssignment) String ¶
func (assign *TaskAssignment) String() string
type TaskItem ¶
TaskItem represents definition of partition in scheduling. A legal Worker must be assigned at least 1 TaskItem.
type TaskRuntime ¶
type TaskRuntime struct { ID string Version int64 Createtime int64 LastHeartbeat int64 NextRunnable int64 // Zero indicating running Statistics Statistics // Redundant fields which can be verified on console or other tools IP string Hostname string ExecutorCount int SchedulerID string StrategyID string OwnSign string TaskID string Bind string }
Click to show internal directories.
Click to hide internal directories.