diff --git a/internal/agent/event/event.go b/internal/agent/event/event.go index 3331beb34..b2fe0eec8 100644 --- a/internal/agent/event/event.go +++ b/internal/agent/event/event.go @@ -7,7 +7,18 @@ import "context" // Name is a unique name identifying an event. type Name string -// Event is a recordable event. +// Event is an event generated during execution of a Workflow. Each event in the event package +// implements this interface. Consumers may type switch the Event to the appropriate type for +// event handling. +// +// E.g. +// +// switch ev.(type) { +// case event.ActionStarted: +// // Handle ActionStarted event. +// default: +// // Unsupported event. +// } type Event interface { // GetName retrieves the event name. GetName() Name