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

Add more explicit documentation to Tick field in CoordinatedActivityH… #173

Merged
merged 2 commits into from
Jul 2, 2016
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
5 changes: 5 additions & 0 deletions activity/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ type CoordinatedActivityHandler struct {
Start CoordinatedActivityHandlerStartFunc

// Tick is called regularly to process a running activity.
// Tick that returns true, nil, nil just expresses that the job is still running.
// Tick that returns true, &SomeStruct{}, nil will express that the job is still running and also send an 'ActivityUpdated' signal back to the FSM with SomeStruct{} as the Input.
// Tick that returns false, &SomeStruct{}, nil, expresses that the job/activity is done and send SomeStruct{} back as the result. as well as stops heartbeating.
// Tick that returns false, nil, nil, expresses that the job is done and send no result back, as well as stops heartbeating.
// Tick that returns false, nil, err expresses that the job/activity failed and sends back err as the reason. as well as stops heartbeating.
Tick CoordinatedActivityHandlerTickFunc

// Cancel is called when a running activity receives a request to cancel
Expand Down