mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? Adds `buf format` as a Makefile target; and integrates it into `make fmt`. All `.proto` changes are from running `make fmt`. ## Why? Consistent protobuf file style. ## How did you test it? - [x] built - [ ] run locally and tested manually - [ ] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s)
71 lines
2.3 KiB
Protocol Buffer
71 lines
2.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package temporal.server.chasm.lib.callbacks.proto.v1;
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "temporal/api/common/v1/message.proto";
|
|
import "temporal/api/failure/v1/message.proto";
|
|
|
|
option go_package = "go.temporal.io/server/chasm/lib/callbacks/gen/callbackspb;callbackspb";
|
|
|
|
message CallbackState {
|
|
// Trigger for when the workflow is closed.
|
|
message WorkflowClosed {}
|
|
|
|
// Information on how this callback should be invoked (e.g. its URL and type).
|
|
Callback callback = 1;
|
|
// The time when the callback was registered.
|
|
google.protobuf.Timestamp registration_time = 3;
|
|
|
|
CallbackStatus status = 4;
|
|
// The number of attempts made to deliver the callback.
|
|
// This number represents a minimum bound since the attempt is incremented after the callback request completes.
|
|
int32 attempt = 5;
|
|
|
|
// The time when the last attempt completed.
|
|
google.protobuf.Timestamp last_attempt_complete_time = 6;
|
|
// The last attempt's failure, if any.
|
|
temporal.api.failure.v1.Failure last_attempt_failure = 7;
|
|
// The time when the next attempt is scheduled.
|
|
// NOTE (seankane): this field might go away in the future, discussion:
|
|
// https://github.com/temporalio/temporal/pull/8473#discussion_r2427348436
|
|
google.protobuf.Timestamp next_attempt_schedule_time = 8;
|
|
|
|
// Request ID that added the callback.
|
|
string request_id = 9;
|
|
}
|
|
|
|
// Status of a callback.
|
|
enum CallbackStatus {
|
|
// Default value, unspecified state.
|
|
CALLBACK_STATUS_UNSPECIFIED = 0;
|
|
// Callback is standing by, waiting to be triggered.
|
|
CALLBACK_STATUS_STANDBY = 1;
|
|
// Callback is in the queue waiting to be executed or is currently executing.
|
|
CALLBACK_STATUS_SCHEDULED = 2;
|
|
// Callback has failed with a retryable error and is backing off before the next attempt.
|
|
CALLBACK_STATUS_BACKING_OFF = 3;
|
|
// Callback has failed.
|
|
CALLBACK_STATUS_FAILED = 4;
|
|
// Callback has succeeded.
|
|
CALLBACK_STATUS_SUCCEEDED = 5;
|
|
}
|
|
|
|
message Callback {
|
|
message Nexus {
|
|
// Callback URL.
|
|
// (-- api-linter: core::0140::uri=disabled
|
|
// aip.dev/not-precedent: Not respecting aip here. --)
|
|
string url = 1;
|
|
// Header to attach to callback request.
|
|
map<string, string> header = 2;
|
|
}
|
|
|
|
reserved 1; // For a generic callback mechanism to be added later.
|
|
oneof variant {
|
|
Nexus nexus = 2;
|
|
}
|
|
|
|
repeated temporal.api.common.v1.Link links = 100;
|
|
}
|