-
Notifications
You must be signed in to change notification settings - Fork 1
/
responses.proto
58 lines (46 loc) · 2.02 KB
/
responses.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
syntax = "proto3";
import "google/protobuf/duration.proto";
// _____/\\\\\\\\\\\____/\\\\\\\\\\\\_____/\\\\\\\\\\\\\___
// ___/\\\/////////\\\_\/\\\////////\\\__\/\\\/////////\\\_
// __\//\\\______\///__\/\\\______\//\\\_\/\\\_______\/\\\_
// ___\////\\\_________\/\\\_______\/\\\_\/\\\\\\\\\\\\\/__
// ______\////\\\______\/\\\_______\/\\\_\/\\\/////////____
// _________\////\\\___\/\\\_______\/\\\_\/\\\_____________
// __/\\\______\//\\\__\/\\\_______/\\\__\/\\\_____________
// _\///\\\\\\\\\\\/___\/\\\\\\\\\\\\/___\/\\\_____________
// ___\///////////_____\////////////_____\///______________
option go_package = "github.com/overmindtech/sdp-go;sdp";
// ResponderState represents the state of the responder, note that both
// COMPLETE and ERROR are completion states i.e. do not expect any more items
// to be returned from the query
enum ResponderState {
// The responder is still gathering data
WORKING = 0;
// The query is complete
COMPLETE = 1;
// All sources have returned errors
ERROR = 2;
// Work has been cancelled while in progress
CANCELLED = 3;
// The responder has not set a response in the expected interval
STALLED = 4;
}
// Response is returned when a query is made
message Response {
// The name of the responder that is working on a response. This is purely
// informational
string responder = 1;
// The state of the responder
ResponderState state = 2;
// The timespan within which to expect the next update. (e.g. 10s) If no
// further interim responses are received within this time the connection
// can be considered stale and the requester may give up
google.protobuf.Duration nextUpdateIn = 3;
// UUID of the item query that this response is in relation to (in binary
// format)
bytes UUID = 4;
// The ID of the responder that is working on a response. This is used for
// internal bookkeeping and should remain constant for the duration of a
// request, preferably over the lifetime of the source process.
bytes responderUUID = 5;
}