Skip to content

Commit

Permalink
add protocol to aggregator api config/capabilities (#1743)
Browse files Browse the repository at this point in the history
* add dap_versions to aggregator api config/capabilities

* dap_version not dap_versions

* s/dap_version/protocol/ because the value includes `dap` and therefore is redundant

* dap-07
  • Loading branch information
jbr authored Sep 18, 2023
1 parent 9763d26 commit bf867ac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions aggregator_api/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub(crate) enum AggregatorRole {

#[derive(Serialize, PartialEq, Eq, Debug)]
pub(crate) struct AggregatorApiConfig {
pub protocol: &'static str,
pub dap_url: Url,
pub role: AggregatorRole,
pub vdafs: Vec<SupportedVdaf>,
Expand Down
1 change: 1 addition & 0 deletions aggregator_api/src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub(super) async fn get_config(
State(config): State<Arc<Config>>,
) -> Json<AggregatorApiConfig> {
Json(AggregatorApiConfig {
protocol: "DAP-07",
dap_url: config.public_dap_url.clone(),
role: AggregatorRole::Either,
vdafs: vec![
Expand Down
2 changes: 1 addition & 1 deletion aggregator_api/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async fn get_config() {
.await,
Status::Ok,
concat!(
r#"{"dap_url":"https://dap.url/","role":"Either","vdafs":"#,
r#"{"protocol":"DAP-07","dap_url":"https://dap.url/","role":"Either","vdafs":"#,
r#"["Prio3Count","Prio3Sum","Prio3Histogram","Prio3CountVec","Prio3SumVec"],"#,
r#""query_types":["TimeInterval","FixedSize"]}"#
)
Expand Down

0 comments on commit bf867ac

Please sign in to comment.