| edition = "2023"; |
| |
| package milotic_hft; |
| |
| import "identifier.proto"; |
| |
| message SubscriptionPolicy { |
| enum ConfigurationType { |
| CONFIGURATION_TYPE_UNSPECIFIED = 0; |
| CONFIGURATION_TYPE_CONFIGURE_ALL_RESOURCES = 1; |
| CONFIGURATION_TYPE_CONFIGURE_SPECIFIC_RESOURCES = 2; |
| } |
| |
| enum ResourceType { |
| RESOURCE_TYPE_UNSPECIFIED = 0; |
| RESOURCE_TYPE_SENSOR = 1; |
| RESOURCE_TYPE_FRU = 2; |
| } |
| ConfigurationType configuration_type = 1; |
| ResourceType resource_type = 2; |
| } |
| |
| message SubscriptionParams { |
| // The interval between two consecutive batches of readings. |
| // If not set, the default sampling interval is implementation defined. |
| int32 sampling_interval_ms = 1; |
| |
| // The interval between two consecutive batches of readings. |
| // |
| // Note: We purposely avoid using batch_size as a way to control the export |
| // interval. This is because different data sources may have different |
| // collection mechanics and if we need to batch data across multiple data |
| // sources, we would need a complex synchronization mechanism to ensure that |
| // the batches are exported at the same time. |
| // |
| // With the export interval, we can simply wait for the specified amount of |
| // time between two consecutive batch exports and get new data since the last |
| // export. |
| int32 export_interval_ms = 2; |
| |
| // The number of batches to export before cancelling the subscription. |
| // If not set, the subscription will continue until explicitly cancelled. |
| int32 num_batches = 3; |
| |
| // The identifiers of the resources to subscribe to. |
| repeated Identifier identifiers = 4; |
| SubscriptionPolicy subscription_policy = 5; |
| } |