Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Event interface code doc #825

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading