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 authored and jacobweinstock committed Oct 25, 2023
1 parent 029b5d6 commit b71e4cd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion internal/agent/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ import "context"
// Name is a unique name identifying an event.
type Name string

// Event is a recordable event.
// Event is a recordable event. Each event in the event package implements this interface. Consumers
// should 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 b71e4cd

Please sign in to comment.