@@ -263,8 +263,9 @@ pub trait ControlStateReadAccess {
263263 async fn get_energy_balance ( & self , identity : & Identity ) -> anyhow:: Result < Option < EnergyBalance > > ;
264264
265265 // DNS
266- async fn lookup_identity ( & self , domain : & str ) -> anyhow:: Result < Option < Identity > > ;
266+ async fn lookup_database_identity ( & self , domain : & str ) -> anyhow:: Result < Option < Identity > > ;
267267 async fn reverse_lookup ( & self , database_identity : & Identity ) -> anyhow:: Result < Vec < DomainName > > ;
268+ async fn lookup_namespace_owner ( & self , name : & str ) -> anyhow:: Result < Option < Identity > > ;
268269}
269270
270271/// Write operations on the SpacetimeDB control plane.
@@ -355,22 +356,26 @@ impl<T: ControlStateReadAccess + Send + Sync + Sync + ?Sized> ControlStateReadAc
355356 ( * * self ) . get_replicas ( ) . await
356357 }
357358
359+ async fn get_leader_replica_by_database ( & self , database_id : u64 ) -> Option < Replica > {
360+ ( * * self ) . get_leader_replica_by_database ( database_id) . await
361+ }
362+
358363 // Energy
359364 async fn get_energy_balance ( & self , identity : & Identity ) -> anyhow:: Result < Option < EnergyBalance > > {
360365 ( * * self ) . get_energy_balance ( identity) . await
361366 }
362367
363368 // DNS
364- async fn lookup_identity ( & self , domain : & str ) -> anyhow:: Result < Option < Identity > > {
365- ( * * self ) . lookup_identity ( domain) . await
369+ async fn lookup_database_identity ( & self , domain : & str ) -> anyhow:: Result < Option < Identity > > {
370+ ( * * self ) . lookup_database_identity ( domain) . await
366371 }
367372
368373 async fn reverse_lookup ( & self , database_identity : & Identity ) -> anyhow:: Result < Vec < DomainName > > {
369374 ( * * self ) . reverse_lookup ( database_identity) . await
370375 }
371376
372- async fn get_leader_replica_by_database ( & self , database_id : u64 ) -> Option < Replica > {
373- ( * * self ) . get_leader_replica_by_database ( database_id ) . await
377+ async fn lookup_namespace_owner ( & self , name : & str ) -> anyhow :: Result < Option < Identity > > {
378+ ( * * self ) . lookup_namespace_owner ( name ) . await
374379 }
375380}
376381
0 commit comments