Documentation ¶
Index ¶
- Constants
- type ActionSignal
- type MockCron
- type RuleState
- func (rs *RuleState) Close() (err error)
- func (rs *RuleState) GetNextScheduleStartTime() int64
- func (rs *RuleState) GetScheduleTimestamp() (int64, int64, int64)
- func (rs *RuleState) GetState() (s string, err error)
- func (rs *RuleState) GetTopoGraph() *api.PrintableTopo
- func (rs *RuleState) InternalStop() (err error)
- func (rs *RuleState) Start() (err error)
- func (rs *RuleState) Stop() (err error)
- func (rs *RuleState) UpdateTopo(rule *api.Rule) (err error)
Constants ¶
View Source
const ( RuleStarted = "Running" RuleStopped = "Stopped: canceled manually." RuleTerminated = "Stopped: schedule terminated." RuleWait = "Stopped: waiting for next schedule." )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionSignal ¶
type ActionSignal int
const ( ActionSignalStart ActionSignal = iota ActionSignalStop )
type MockCron ¶
type MockCron struct {
// contains filtered or unexported fields
}
type RuleState ¶
type RuleState struct { // Constant, never change. Channel to send signals to manage connection retry. When deleting the rule, close it. RuleId string ActionCh chan ActionSignal // Nearly constant, only change when update the rule Rule *api.Rule // States, create through rule in each rule start Topology *topo.Topo sync.RWMutex // contains filtered or unexported fields }
func NewRuleState ¶
NewRuleState Create and initialize a rule state. Errors are possible during plan the topo. If error happens return immediately without add it to the registry
func (*RuleState) GetNextScheduleStartTime ¶
func (*RuleState) GetScheduleTimestamp ¶
func (*RuleState) GetTopoGraph ¶
func (rs *RuleState) GetTopoGraph() *api.PrintableTopo
func (*RuleState) InternalStop ¶
Click to show internal directories.
Click to hide internal directories.