risingwave_meta::rpc::election::sqlTrait SqlDriver
source pub trait SqlDriver:
Send
+ Sync
+ 'static {
// Required methods
fn init_database<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = MetaResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_heartbeat<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
service_name: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = MetaResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn try_campaign<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
service_name: &'life1 str,
id: &'life2 str,
ttl: i64,
) -> Pin<Box<dyn Future<Output = MetaResult<ElectionRow>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn leader<'life0, 'life1, 'async_trait>(
&'life0 self,
service_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = MetaResult<Option<ElectionRow>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn candidates<'life0, 'life1, 'async_trait>(
&'life0 self,
service_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = MetaResult<Vec<ElectionRow>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn resign<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
service_name: &'life1 str,
id: &'life2 str,
) -> Pin<Box<dyn Future<Output = MetaResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn trim_candidates<'life0, 'life1, 'async_trait>(
&'life0 self,
service_name: &'life1 str,
timeout: i64,
) -> Pin<Box<dyn Future<Output = MetaResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}