pub struct InMemoryClusterState { /* private fields */ }Trait Implementations§
Source§impl ClusterState for InMemoryClusterState
impl ClusterState for InMemoryClusterState
Source§fn bind_schedulable_tasks<'life0, 'async_trait>(
&'life0 self,
distribution: TaskDistributionPolicy,
active_jobs: Arc<HashMap<String, JobInfoCache>>,
executors: Option<HashSet<String>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoundTask>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bind_schedulable_tasks<'life0, 'async_trait>(
&'life0 self,
distribution: TaskDistributionPolicy,
active_jobs: Arc<HashMap<String, JobInfoCache>>,
executors: Option<HashSet<String>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoundTask>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Bind the ready to running tasks from [
active_jobs] with available executors. Read moreSource§fn unbind_tasks<'life0, 'async_trait>(
&'life0 self,
executor_slots: Vec<ExecutorSlot>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unbind_tasks<'life0, 'async_trait>(
&'life0 self,
executor_slots: Vec<ExecutorSlot>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Unbind executor and task when a task finishes or fails. It will increase the executor
available task slots. Read more
Source§fn register_executor<'life0, 'async_trait>(
&'life0 self,
metadata: ExecutorMetadata,
spec: ExecutorData,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_executor<'life0, 'async_trait>(
&'life0 self,
metadata: ExecutorMetadata,
spec: ExecutorData,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Register a new executor in the cluster.
Source§fn save_executor_metadata<'life0, 'async_trait>(
&'life0 self,
metadata: ExecutorMetadata,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_executor_metadata<'life0, 'async_trait>(
&'life0 self,
metadata: ExecutorMetadata,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save the executor metadata. This will overwrite existing metadata for the executor ID
Source§fn get_executor_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
executor_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExecutorMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_executor_metadata<'life0, 'life1, 'async_trait>(
&'life0 self,
executor_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExecutorMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get executor metadata for the provided executor ID. Returns an error if the executor does not exist
Source§fn save_executor_heartbeat<'life0, 'async_trait>(
&'life0 self,
heartbeat: ExecutorHeartbeat,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_executor_heartbeat<'life0, 'async_trait>(
&'life0 self,
heartbeat: ExecutorHeartbeat,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save the executor heartbeat
Source§fn remove_executor<'life0, 'life1, 'async_trait>(
&'life0 self,
executor_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_executor<'life0, 'life1, 'async_trait>(
&'life0 self,
executor_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove the executor from the cluster
Source§fn executor_heartbeats(&self) -> HashMap<String, ExecutorHeartbeat>
fn executor_heartbeats(&self) -> HashMap<String, ExecutorHeartbeat>
Return a map of the last seen heartbeat for all active executors
Source§fn get_executor_heartbeat(&self, executor_id: &str) -> Option<ExecutorHeartbeat>
fn get_executor_heartbeat(&self, executor_id: &str) -> Option<ExecutorHeartbeat>
Get executor heartbeat for the provided executor ID. Return None if the executor does not exist
Source§impl Default for InMemoryClusterState
impl Default for InMemoryClusterState
Source§fn default() -> InMemoryClusterState
fn default() -> InMemoryClusterState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for InMemoryClusterState
impl !RefUnwindSafe for InMemoryClusterState
impl Send for InMemoryClusterState
impl Sync for InMemoryClusterState
impl Unpin for InMemoryClusterState
impl !UnwindSafe for InMemoryClusterState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request