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

feat: synchronous emitter bindings #7

Merged
merged 5 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions examples/temporal-expense/expense_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,10 @@ func ExpenseFlow(
})

// bind handlers and wait for Ready
binding, err := machine.BindHandlers(&MachineHandlers{})
err := machine.BindHandlers(&MachineHandlers{})
if err != nil {
return machine, err
}
<-binding.Ready

// reusable error channel
errCh := machine.WhenErr(nil)
Expand Down
3 changes: 1 addition & 2 deletions examples/temporal-fileprocessing/fileprocessing.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,10 @@ func FileProcessingFlow(ctx context.Context, log Logger, filename string) (*am.M
})

// bind handlers and wait for Ready
binding, err := machine.BindHandlers(&MachineHandlers{})
err := machine.BindHandlers(&MachineHandlers{})
if err != nil {
return machine, err
}
<-binding.Ready

// start it up!
machine.Add(am.S{"DownloadingFile"}, am.A{"filename": filename})
Expand Down
Loading