Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dav1dde committed Aug 27, 2024
1 parent fcbe533 commit e267585
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion relay-server/src/endpoints/project_configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ async fn inner(
})
.collect();

// Skip unparsable public keys. The downstream Relay will consider them `ProjectState::missing`.
let (global, global_status) = if inner.global {
match state.global_config().send(global_config::Get).await? {
global_config::Status::Ready(config) => (Some(config), Some(StatusResponse::Ready)),
Expand Down
13 changes: 13 additions & 0 deletions relay-server/src/services/project_upstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,18 @@ use crate::utils::{RetryBackoff, SleepHandle};
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct GetProjectStates {
/// List of requested project keys.
public_keys: Vec<ProjectKey>,
/// List of revisions for each project key.
///
/// The revisions are mapped by index to the project key,
/// this is a separate field to keep the API compatible.
revisions: Vec<Option<String>>,
/// If `true` the upstream should return a full configuration.
///
/// Upstreams will ignore this for non-internal Relays.
full_config: bool,
/// If `true` the upstream should not serve from cache.
no_cache: bool,
}

Expand All @@ -54,6 +63,10 @@ pub struct GetProjectStatesResponse {
/// The [`ProjectKey`]'s that couldn't be immediately retrieved from the upstream.
#[serde(default)]
pending: HashSet<ProjectKey>,
/// The [`ProjectKey`]'s that the upstream has no updates for.
///
/// List is only populated when the request contains revision information
/// for all requested configurations.
#[serde(default)]
unchanged: HashSet<ProjectKey>,
}
Expand Down

0 comments on commit e267585

Please sign in to comment.