pub struct Puller {
pub me: Addressee,
pub build: String,
pub pulled: Pulled,
/* private fields */
}Fields§
§me: Addressee§build: String§pulled: PulledImplementations§
Source§impl Puller
impl Puller
Sourcepub fn new(me: Addressee, key: BoxKey, build: impl Into<String>) -> Puller
pub fn new(me: Addressee, key: BoxKey, build: impl Into<String>) -> Puller
A puller that remembers nothing on disk (tests).
Sourcepub fn at(
root: &Path,
me: Addressee,
build: impl Into<String>,
) -> Result<Puller, Error>
pub fn at( root: &Path, me: Addressee, build: impl Into<String>, ) -> Result<Puller, Error>
The box’s puller over its data root: its key (minted on first use) and what it took.
pub fn box_public(&self) -> [u8; 32]
Sourcepub fn report(
&mut self,
link: &mut dyn Link,
health: BTreeMap<String, String>,
product: Option<String>,
own_review: Option<String>,
now_unix_ms: u64,
) -> Result<u64, Fault>
pub fn report( &mut self, link: &mut dyn Link, health: BTreeMap<String, String>, product: Option<String>, own_review: Option<String>, now_unix_ms: u64, ) -> Result<u64, Fault>
Report this box’s health, the product’s own part (the main that serves), its own
twin review (a twin, every report) and every pending ack. The acks leave the queue
once monetize answered. Returns monetize’s next_report_ms.
Sourcepub fn pull(
&mut self,
link: &mut dyn Link,
b: &dyn PumpBox,
monetize_pubkey: Option<&[u8; 32]>,
wait_ms: u64,
now_unix_ms: u64,
) -> Result<Pull, Fault>
pub fn pull( &mut self, link: &mut dyn Link, b: &dyn PumpBox, monetize_pubkey: Option<&[u8; 32]>, wait_ms: u64, now_unix_ms: u64, ) -> Result<Pull, Fault>
Pull the orders after the last one taken, held up to wait_ms (≤ 25 s); check
each under monetize_pubkey, run it through b and queue its ack. Without a key nothing
is pulled: nothing could be verified. A review_twin that ran rides the next report.
Auto Trait Implementations§
impl Freeze for Puller
impl RefUnwindSafe for Puller
impl Send for Puller
impl Sync for Puller
impl Unpin for Puller
impl UnsafeUnpin for Puller
impl UnwindSafe for Puller
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