Task
message Task {
string id = 1; // used for deduplication with consumer_id
string json_message = 2; // json string, can be parsed and analyzed
bytes blob_message = 3; // binary string
string consumer_id = 4; // consumer signature which should be interested in this task when it is due. eg: com.git.pcheng.consumers.email#sendToSubscriber
string sender_id = 5; // sender signature
Timestamp due_at = 6; // when should this task be done,aka,callback invoked
}
TaskRequest
message TaskRequest {
Task task = 1;
enum Action {
Create = 0;
Update = 1;
UpdateOrCreate = 2;
Delete = 3;
}
Action action = 2;
}
http request
POST /tasks
{
// TaskRequest.json
}
response:
200 ok or 400 with error message