| edition = "2023"; |
| |
| package milotic_hft; |
| |
| import "identifier.proto"; |
| import "subscription_params.proto"; |
| |
| message GetCapabilitiesRequest { |
| // ETag-style revalidation. If the service's current generation matches, |
| // the response carries unchanged=TRISTATE_TRUE and an empty body. |
| string known_generation = 1; |
| } |
| |
| // One per hft service. |
| message CapabilitiesResponse { |
| // Opaque per-boot identifier. Generated once on HFT service startup (e.g. |
| // UUID4) and held constant until the next service restart. Used by collectors |
| // as an ETag. |
| // |
| // The contract is "capabilities cannot change without a service restart," so |
| // a matching `generation` is sufficient evidence that the cache is valid. |
| string generation = 1; |
| |
| // TRISTATE_TRUE if the request's known_generation matched and the rest of |
| // this response was elided. Collector keeps its cache. |
| Tristate unchanged = 2; |
| |
| // Service features. |
| ServiceFeatures features = 3; |
| |
| // ---- Identifier-level capabilities (static) ---- |
| // Per-identifier dynamic state (present/missing/stale) flows in-band on |
| // the data stream via sensor_payload.State and is NOT included here. |
| repeated IdentifierDescriptor identifier_descriptors = 4; |
| } |
| |
| enum Tristate { |
| TRISTATE_UNSPECIFIED = 0; |
| TRISTATE_TRUE = 1; |
| TRISTATE_FALSE = 2; |
| } |
| |
| message ServiceFeatures { |
| // Whether the service supports edge filtering at the source. If |
| // TRISTATE_FALSE, edge_filtering_detail will not be populated. |
| Tristate edge_filtering_supported = 1; |
| |
| // Detail capabilities for specific edge filtering types. |
| message EdgeFilteringDetail { |
| // Whether the service supports the ON-CHANGE filter. |
| Tristate on_change_supported = 1; |
| // Whether the service supports the SDT (Swinging Door Trending) filter. |
| Tristate sdt_supported = 2; |
| } |
| EdgeFilteringDetail edge_filtering_detail = 2; |
| } |
| |
| message SubscriptionShape { |
| SubscriptionPolicy.ConfigurationType configuration_type = 1; |
| SubscriptionPolicy.ResourceType resource_type = 2; |
| } |
| |
| message IdentifierDescriptor { |
| Identifier identifier = 1; |
| |
| // Best-effort upstream cadence. Absent (zero) means unknown to hft service. |
| uint32 source_sampling_interval_ms = 2; |
| |
| // Reading type. Mirrors HighFrequencySensorReading.oneof. |
| enum ReadingType { |
| READING_TYPE_UNSPECIFIED = 0; |
| FLOAT = 1; |
| COUNT = 2; |
| FRU = 3; |
| } |
| ReadingType reading_type = 3; |
| } |