|
|
@ -73,6 +73,7 @@ type Event interface {
|
|
|
|
RequiredResources() []Resource
|
|
|
|
RequiredResources() []Resource
|
|
|
|
DoneResource() Resource
|
|
|
|
DoneResource() Resource
|
|
|
|
SetTimeout(end_time time.Time, action string)
|
|
|
|
SetTimeout(end_time time.Time, action string)
|
|
|
|
|
|
|
|
ClearTimeout()
|
|
|
|
Timeout() <-chan time.Time
|
|
|
|
Timeout() <-chan time.Time
|
|
|
|
TimeoutAction() string
|
|
|
|
TimeoutAction() string
|
|
|
|
Signal() chan GraphSignal
|
|
|
|
Signal() chan GraphSignal
|
|
|
@ -95,6 +96,11 @@ func (event * BaseEvent) Timeout() <-chan time.Time {
|
|
|
|
return event.timeout
|
|
|
|
return event.timeout
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (event * BaseEvent) ClearTimeout() {
|
|
|
|
|
|
|
|
event.timeout_action = ""
|
|
|
|
|
|
|
|
event.timeout = nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (event * BaseEvent) SetTimeout(end_time time.Time, action string) {
|
|
|
|
func (event * BaseEvent) SetTimeout(end_time time.Time, action string) {
|
|
|
|
event.timeout_action = action
|
|
|
|
event.timeout_action = action
|
|
|
|
event.timeout = time.After(time.Until(end_time))
|
|
|
|
event.timeout = time.After(time.Until(end_time))
|
|
|
|