Struct brane_cli::planner::OfflinePlanner
source · pub struct OfflinePlanner {
pub results: Arc<Mutex<HashMap<String, String>>>,
/* private fields */
}
Expand description
The planner is in charge of assigning locations to tasks in a workflow. This one is very simple, assigning ‘localhost’ to whatever it sees.
Fields§
§results: Arc<Mutex<HashMap<String, String>>>
The results we planned last time (or whatever).
Implementations§
source§impl OfflinePlanner
impl OfflinePlanner
sourcepub fn new(
data_index: Arc<DataIndex>,
results: Arc<Mutex<HashMap<String, String>>>,
) -> Self
pub fn new( data_index: Arc<DataIndex>, results: Arc<Mutex<HashMap<String, String>>>, ) -> Self
sourcepub fn plan_data(
name: &DataName,
avail: &mut Option<AvailabilityKind>,
dindex: &Arc<DataIndex>,
results: &HashMap<String, String>,
deferred: bool,
) -> Result<(), PlanError>
pub fn plan_data( name: &DataName, avail: &mut Option<AvailabilityKind>, dindex: &Arc<DataIndex>, results: &HashMap<String, String>, deferred: bool, ) -> Result<(), PlanError>
Plans the given task offline.
§Arguments
name
: The name of the dataset or intermediate result, as a DataName (so we can distinguish between the two).avail
: The availability for this dataset that we will be updating.dindex
: The DataIndex we use to see what datasets are actually available where.results
: The map of results that are known in this workflow.deferred
: Iftrue
, then will not error if we failed to find a result yet (its declaration might come later, in that case).
§Returns
Nothing, but does change the dataset’s availability.
Trait Implementations§
source§impl Debug for OfflinePlanner
impl Debug for OfflinePlanner
Auto Trait Implementations§
impl Freeze for OfflinePlanner
impl !RefUnwindSafe for OfflinePlanner
impl Send for OfflinePlanner
impl Sync for OfflinePlanner
impl Unpin for OfflinePlanner
impl !UnwindSafe for OfflinePlanner
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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