Skip to content

Commit

Permalink
Update Event interface code doc
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Doherty <[email protected]>
  • Loading branch information
chrisdoherty4 committed Nov 2, 2023
1 parent 809f2c0 commit 946b93c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion internal/agent/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 946b93c

Please sign in to comment.