Struct lunatic_distributed::control::client::Client
source · pub struct Client { /* private fields */ }
Implementations§
source§impl Client
impl Client
pub async fn new( http_client: HttpClient, reg: Registration, node_address: SocketAddr, attributes: HashMap<String, String> ) -> Result<Self>
pub async fn register( http_client: &HttpClient, control_url: Url, node_name: Uuid, csr_pem: String ) -> Result<Registration>
pub fn reg(&self) -> Registration
pub fn node_id(&self) -> u64
pub fn next_message_id(&self) -> u64
pub fn next_query_id(&self) -> u64
pub async fn get<T: DeserializeOwned>( &self, url: &str, query: Option<&str> ) -> Result<T>
pub async fn post<T: Serialize, R: DeserializeOwned>( &self, url: &str, data: T ) -> Result<R>
pub async fn upload<R: DeserializeOwned>( &self, url: &str, body: Vec<u8> ) -> Result<R>
pub async fn refresh_nodes(&self) -> Result<()>
pub async fn notify_node_stopped(&self) -> Result<()>
pub fn node_info(&self, node_id: u64) -> Option<NodeInfo>
pub fn node_ids(&self) -> Vec<u64>
pub async fn lookup_nodes(&self, query: &str) -> Result<(u64, usize)>
pub fn query_result(&self, query_id: &u64) -> Option<(u64, Vec<u64>)>
pub fn node_count(&self) -> usize
pub async fn get_module( &self, module_id: u64, environment_id: u64 ) -> Result<Vec<u8>>
pub async fn add_module(&self, module: Vec<u8>) -> Result<RawWasm>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§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
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where T: AsFilelike,
Query the “status” flags for the
self
file descriptor.