-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
74 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// taken from https://github.com/spica-engine/spica/blob/master/stacks/api/function/queue/proto/event.proto | ||
syntax = "proto3"; | ||
|
||
package event; | ||
|
||
message SchedulingContext { | ||
repeated Env env = 2; | ||
int32 timeout = 3; | ||
Batch batch = 4; | ||
message Env { | ||
string key = 1; | ||
string value = 2; | ||
} | ||
|
||
message Batch { | ||
uint64 limit = 1; | ||
uint64 deadline = 2; | ||
} | ||
} | ||
|
||
message Target { | ||
string id = 1; | ||
string cwd = 2; | ||
string handler = 3; | ||
SchedulingContext context = 4; | ||
} | ||
|
||
enum Type { | ||
HTTP = 0; | ||
DATABASE = 1; | ||
SCHEDULE = 3; | ||
FIREHOSE = 4; | ||
SYSTEM = 5; | ||
BUCKET = 6; | ||
} | ||
|
||
message Event { | ||
string id = 1; | ||
Type type = 2; | ||
Target target = 3; | ||
} | ||
|
||
message Pop { | ||
string id = 1; | ||
} | ||
|
||
message Complete { | ||
string id = 1; | ||
message Result {} | ||
} | ||
|
||
|
||
|
||
service Queue { | ||
rpc pop(Pop) returns (Event); | ||
rpc complete(Complete) returns (Complete.Result); | ||
} |