Skip to content

Commit

Permalink
make the make_region_configuration_map async
Browse files Browse the repository at this point in the history
  • Loading branch information
paritosh-08 committed Oct 5, 2023
1 parent b3bd06c commit 13a358f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions rust-connector-sdk/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ pub trait Connector {
type State;

/// Creates the region configuration map
fn make_region_configuration_map(
async fn make_region_configuration_map(
_raw_config: &Self::RawConfiguration,
) -> HashMap<String, RegionConfiguration<Self>> {
) -> Result<HashMap<String, RegionConfiguration<Self>>, ValidateError> {
// Defaults to an empty map
HashMap::new()
Ok(HashMap::new())
}

fn make_empty_configuration() -> Self::RawConfiguration;
Expand Down Expand Up @@ -295,10 +295,8 @@ pub enum ConnectorMode {
}

#[derive(Serialize, Deserialize)]
#[serde(
bound = "<C as Connector>::Configuration: Serialize, <C as Connector>::Configuration: DeserializeOwned"
)]
#[serde(bound = "C::Configuration: Serialize, C::Configuration: DeserializeOwned")]
pub struct RegionConfiguration<C: Connector + ?Sized> {
pub config: <C as Connector>::Configuration,
pub config: C::Configuration,
pub mode: ConnectorMode,
}

0 comments on commit 13a358f

Please sign in to comment.