chore: slight refactor of postgres public score
Some checks are pending
Run Check Script / check (pull_request) Waiting to run
Some checks are pending
Run Check Script / check (pull_request) Waiting to run
This commit is contained in:
@@ -37,7 +37,7 @@ impl PublicPostgreSQLScore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Topology + PostgreSQL + TlsRouter + Send + Sync> Score<T> for PublicPostgreSQLScore {
|
impl<T: Topology + PostgreSQL + TlsRouter> Score<T> for PublicPostgreSQLScore {
|
||||||
fn create_interpret(&self) -> Box<dyn Interpret<T>> {
|
fn create_interpret(&self) -> Box<dyn Interpret<T>> {
|
||||||
let rw_backend = format!("{}-rw", self.config.cluster_name);
|
let rw_backend = format!("{}-rw", self.config.cluster_name);
|
||||||
let tls_route = TlsRoute {
|
let tls_route = TlsRoute {
|
||||||
@@ -69,21 +69,9 @@ struct PublicPostgreSQLInterpret {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl<T: Topology + PostgreSQL + TlsRouter + Send + Sync> Interpret<T>
|
impl<T: Topology + PostgreSQL + TlsRouter> Interpret<T>
|
||||||
for PublicPostgreSQLInterpret
|
for PublicPostgreSQLInterpret
|
||||||
{
|
{
|
||||||
fn get_name(&self) -> InterpretName {
|
|
||||||
InterpretName::Custom("PublicPostgreSQLInterpret")
|
|
||||||
}
|
|
||||||
fn get_version(&self) -> Version {
|
|
||||||
todo!()
|
|
||||||
}
|
|
||||||
fn get_status(&self) -> InterpretStatus {
|
|
||||||
todo!()
|
|
||||||
}
|
|
||||||
fn get_children(&self) -> Vec<Id> {
|
|
||||||
todo!()
|
|
||||||
}
|
|
||||||
async fn execute(&self, _inventory: &Inventory, topo: &T) -> Result<Outcome, InterpretError> {
|
async fn execute(&self, _inventory: &Inventory, topo: &T) -> Result<Outcome, InterpretError> {
|
||||||
// Deploy CNPG cluster first (creates -rw service)
|
// Deploy CNPG cluster first (creates -rw service)
|
||||||
topo.deploy(&self.config)
|
topo.deploy(&self.config)
|
||||||
@@ -101,4 +89,17 @@ impl<T: Topology + PostgreSQL + TlsRouter + Send + Sync> Interpret<T>
|
|||||||
self.tls_route.hostname
|
self.tls_route.hostname
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn get_name(&self) -> InterpretName {
|
||||||
|
InterpretName::Custom("PublicPostgreSQLInterpret")
|
||||||
|
}
|
||||||
|
fn get_version(&self) -> Version {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
fn get_status(&self) -> InterpretStatus {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
fn get_children(&self) -> Vec<Id> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user