Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConditionKeyCPURatio = "cpu_ratio" ConditionKeyMemRatio = "mem_ratio" ConditionKeyGoroutineNum = "goroutine_num" ConditionCompareTypeThreshold = "threshold" ConditionCompareTypeWindow = "windows" ConditionOpGt = ">" //only support gt )
View Source
const ( RecordTypeContinuous = "continuous" RecordTypeTask = "task" // alias 'timed', 'task' for forward compatibility RecordTypeConditional = "conditional" )
View Source
const ( Seconds60 = 60 ContinuousPeriodTime = time.Second * Seconds60 // continuous period ConditionalCheckInterval = time.Second * Seconds60 // time interval the conditions are checked )
View Source
const ( TimedPeriodSec = 10 TimedPeriodTime = time.Second * TimedPeriodSec )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConditionalDriver ¶
type ConditionalDriver struct {
// contains filtered or unexported fields
}
func (*ConditionalDriver) Handle ¶
func (d *ConditionalDriver) Handle(ps []*settings_models.Profile)
func (*ConditionalDriver) Name ¶
func (d *ConditionalDriver) Name() string
func (*ConditionalDriver) Start ¶
func (d *ConditionalDriver) Start()
func (*ConditionalDriver) Stop ¶
func (d *ConditionalDriver) Stop()
type ContinuousDriver ¶
type ContinuousDriver struct {
// contains filtered or unexported fields
}
func (*ContinuousDriver) Handle ¶
func (d *ContinuousDriver) Handle(ps []*settings_models.Profile)
func (*ContinuousDriver) Name ¶
func (d *ContinuousDriver) Name() string
func (*ContinuousDriver) Start ¶
func (d *ContinuousDriver) Start()
func (*ContinuousDriver) Stop ¶
func (d *ContinuousDriver) Stop()
type Driver ¶
type Driver interface { Name() string Handle([]*settings_models.Profile) Start() Stop() }
func NewConditionalDriver ¶
func NewContinuousDriver ¶
type TimedDriver ¶
type TimedDriver struct {
// contains filtered or unexported fields
}
func (*TimedDriver) Handle ¶
func (d *TimedDriver) Handle(ps []*settings_models.Profile)
func (*TimedDriver) Name ¶
func (d *TimedDriver) Name() string
func (*TimedDriver) Start ¶
func (d *TimedDriver) Start()
func (*TimedDriver) Stop ¶
func (d *TimedDriver) Stop()
Click to show internal directories.
Click to hide internal directories.