Skip to content

Commit

Permalink
chore: MigrationStore -> migration::Store
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 committed Jun 25, 2024
1 parent 5c63eb1 commit 8e87e0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/attestation_store/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ use {
async_trait::async_trait,
};

pub struct MigrationStore {
pub struct Store {
redis: redis::Adapter,
cf_kv: CloudflareKv,
}

impl MigrationStore {
impl Store {
pub fn new(redis: redis::Adapter, cf_kv: CloudflareKv) -> Self {
Self { redis, cf_kv }
}
}

#[async_trait]
impl AttestationStore for MigrationStore {
impl AttestationStore for Store {
async fn set_attestation(&self, id: &str, origin: &str) -> Result<()> {
let redis_fut = self.redis.set_attestation(id, origin);
let cf_kv_fut = self.cf_kv.set_attestation(id, origin);
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use {
AXUM_HTTP_REQUESTS_DURATION_SECONDS,
},
bouncer::{
attestation_store::{cf_kv::CloudflareKv, migration::MigrationStore},
attestation_store::{cf_kv::CloudflareKv, migration},
event_sink,
http_server::{RequestInfo, ServerConfig, TokenManager},
project_registry::{self, CachedExt as _},
Expand Down Expand Up @@ -113,7 +113,7 @@ async fn main() -> Result<(), anyhow::Error> {
.context("Failed to parse cf_kv_endpoint")?,
TokenManager::new(config.secret.as_bytes()),
);
MigrationStore::new(redis_attestation_store, cf_kv_attestation_store)
migration::Store::new(redis_attestation_store, cf_kv_attestation_store)
};

let project_registry_cache = redis::new(
Expand Down

0 comments on commit 8e87e0a

Please sign in to comment.