Documentation ¶
Index ¶
- func CheckWorkerTimeout(event *api.Event)
- func DeleteEventByRecordID(id string) error
- func GetEvent(id string) (*api.Event, error)
- func Init(opts *options.WorkerOptions, notifyURL, recordURLTemplate string)
- func IsEventFinished(event *api.Event) bool
- func UpdateEvent(event *api.Event) error
- type EventManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteEventByRecordID ¶ added in v0.7.1
DeleteEventByRecordID deletes the event. If it is running, delete its worker at the same time.
func Init ¶
func Init(opts *options.WorkerOptions, notifyURL, recordURLTemplate string)
Init init event manager Step1: new event manager Step2: create a goroutine to watch events
func IsEventFinished ¶
IsEventFinished return true if event is finished.
func UpdateEvent ¶
UpdateEvent updates the event. If it is finished, delete it and trigger the post hook. func (em *eventManager) UpdateEvent(event *api.Event) error {
Types ¶
type EventManager ¶
EventManager represents the manager of events.
func NewEventManager ¶
func NewEventManager(ds *store.DataStore) EventManager
NewEventManager creates the event manager.
Click to show internal directories.
Click to hide internal directories.