batchjob

package
v0.0.0-...-3e85c3f Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCronJob

func AddCronJob(c *cron.Cron, rdbStore rdb.Store, tsStore tsdb.Store, statRange models.StatRange)

AddCronJob returns a function that could be passed to the cron library.

func StatWorker

func StatWorker(rdbStore rdb.Store, tsStore tsdb.Store, beginTime time.Time, statRange models.StatRange) error

StatWorker collects heartbeats from tsdb and writes stat to rdb collects heartbeats from `startTime` with a given range length

func ToDuration

func ToDuration(statRange models.StatRange) time.Duration

ToDuration converts semantics of statRange into time.Duration. FIXME: it is an approximation. To get real duration, we have to decide whether use calendar date or duration date and have to have another argument of beginTime.

Types

type WorkunitWithEndtime

type WorkunitWithEndtime struct {
	models.Workunit
	Endtime float64
}

WorkunitWithEndtime is a temporal struct for aggregation

type Workunits

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

Workunits is a temporal struct for aggregation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址