Subscription
The subscription.proto contract defines the UpdateSubscription RPC — the way to change which aircraft you receive. Filters live server-side on your subscription; updating them here means the next stream you open delivers only the data you asked for, with no client-side filtering needed.
subscription.proto
syntax = "proto3";
package jetnet.streaming;
message Filter {
FilterGroup root_group = 1;
}
message FilterGroup {
enum LogicalOperator {
LOGICAL_OPERATOR_UNSPECIFIED = 0;
AND = 1;
OR = 2;
}
LogicalOperator op = 1;
repeated FilterCondition conditions = 2;
repeated FilterGroup groups = 3;
}
message FilterCondition {
string field = 1;
string op = 2;
string value = 3;
}
message UpdateSubscriptionRequest {
string subscription_id = 1;
string name = 2;
Filter filters = 3;
}
message Subscription {
string id = 1;
string client_id = 2;
string name = 3;
Filter filters = 4;
string topic_name = 5;
}
service SubscriptionService {
rpc UpdateSubscription(UpdateSubscriptionRequest) returns (Subscription);
}
Related
- Worked filter examples and how to invoke
UpdateSubscription— see Filtering.