[−][src]Struct noria::ControllerHandle
A handle to a Noria controller.
This handle is the primary mechanism for interacting with a running Noria instance, and lets you add and remove queries, retrieve handles for inserting or querying the underlying data, and to perform meta-operations such as fetching the dataflow's GraphViz visualization.
To establish a new connection to Noria, use ControllerHandle::new
, and pass in the
appropriate Authority
. In the likely case that you are using Zookeeper, use
ControllerHandle::from_zk
.
Note that whatever Tokio Runtime you use to execute the Future
that resolves into the
ControllerHandle
will also be the one that executes all your reads and writes through View
and Table
. Make sure that that Runtime
stays alive, and continues to be driven, otherwise
none of your operations will ever complete! Furthermore, you must use the Runtime
to
execute any futures returned from ControllerHandle
(that is, you cannot just call .wait()
on them).
Implementations
impl ControllerHandle<ZookeeperAuthority>
[src]
pub async fn from_zk<'_>(zookeeper_address: &'_ str) -> Result<Self, Error>
[src]
Fetch information about the current Soup controller from Zookeeper running at the given
address, and create a ControllerHandle
from that.
impl<A: Authority + 'static> ControllerHandle<A>
[src]
pub fn poll_ready(&mut self, cx: &mut Context) -> Poll<Result<(), Error>>
[src]
Check that the ControllerHandle
can accept another request.
Note that this method must return Poll::Ready
before any other methods that return
a Future
on ControllerHandle
can be called.
pub async fn ready<'_>(&'_ mut self) -> Result<(), Error>
[src]
A future that resolves when the controller can accept more messages.
When this future resolves, you it is safe to call any methods that require poll_ready
to
have returned Poll::Ready
.
pub async fn new(authority: A) -> Result<Self, Error> where
A: Send + 'static,
[src]
A: Send + 'static,
Create a ControllerHandle
that bootstraps a connection to Noria via the configuration
stored in the given authority
.
You probably want to use ControllerHandle::from_zk
instead.
pub fn inputs(
&mut self
) -> impl Future<Output = Result<BTreeMap<String, NodeIndex>, Error>>
[src]
&mut self
) -> impl Future<Output = Result<BTreeMap<String, NodeIndex>, Error>>
Enumerate all known base tables.
These have all been created in response to a CREATE TABLE
statement in a recipe.
Self::poll_ready
must have returned Async::Ready
before you call this method.
pub fn outputs(
&mut self
) -> impl Future<Output = Result<BTreeMap<String, NodeIndex>, Error>>
[src]
&mut self
) -> impl Future<Output = Result<BTreeMap<String, NodeIndex>, Error>>
Enumerate all known external views.
These have all been created in response to a CREATE EXT VIEW
statement in a recipe.
Self::poll_ready
must have returned Async::Ready
before you call this method.
pub fn view(&mut self, name: &str) -> impl Future<Output = Result<View, Error>>
[src]
Obtain a View
that allows you to query the given external view.
Self::poll_ready
must have returned Async::Ready
before you call this method.
pub fn table(
&mut self,
name: &str
) -> impl Future<Output = Result<Table, Error>>
[src]
&mut self,
name: &str
) -> impl Future<Output = Result<Table, Error>>
Obtain a Table
that allows you to perform writes, deletes, and other operations on the
given base table.
Self::poll_ready
must have returned Async::Ready
before you call this method.
pub fn statistics(&mut self) -> impl Future<Output = Result<GraphStats, Error>>
[src]
Get statistics about the time spent processing different parts of the graph.
Self::poll_ready
must have returned Async::Ready
before you call this method.
pub fn flush_partial(&mut self) -> impl Future<Output = Result<(), Error>>
[src]
Flush all partial state, evicting all rows present.
Self::poll_ready
must have returned Async::Ready
before you call this method.
pub fn extend_recipe(
&mut self,
recipe_addition: &str
) -> impl Future<Output = Result<ActivationResult, Error>>
[src]
&mut self,
recipe_addition: &str
) -> impl Future<Output = Result<ActivationResult, Error>>
Extend the existing recipe with the given set of queries.
Self::poll_ready
must have returned Async::Ready
before you call this method.
pub fn install_recipe(
&mut self,
new_recipe: &str
) -> impl Future<Output = Result<ActivationResult, Error>>
[src]
&mut self,
new_recipe: &str
) -> impl Future<Output = Result<ActivationResult, Error>>
Replace the existing recipe with this one.
Self::poll_ready
must have returned Async::Ready
before you call this method.
pub fn graphviz(&mut self) -> impl Future<Output = Result<String, Error>>
[src]
Fetch a graphviz description of the dataflow graph.
Self::poll_ready
must have returned Async::Ready
before you call this method.
pub fn simple_graphviz(&mut self) -> impl Future<Output = Result<String, Error>>
[src]
Fetch a simplified graphviz description of the dataflow graph.
Self::poll_ready
must have returned Async::Ready
before you call this method.
pub fn remove_node(
&mut self,
view: NodeIndex
) -> impl Future<Output = Result<(), Error>>
[src]
&mut self,
view: NodeIndex
) -> impl Future<Output = Result<(), Error>>
Remove the given external view from the graph.
Self::poll_ready
must have returned Async::Ready
before you call this method.
Trait Implementations
impl<A> Clone for ControllerHandle<A> where
A: 'static + Authority,
[src]
A: 'static + Authority,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<A> !RefUnwindSafe for ControllerHandle<A>
impl<A> Send for ControllerHandle<A>
impl<A> Sync for ControllerHandle<A>
impl<A> Unpin for ControllerHandle<A>
impl<A> !UnwindSafe for ControllerHandle<A>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,