Skip to main content

Peer

Trait Peer 

Source
pub trait Peer {
    // Required method
    fn call(&mut self, action: PairingOp) -> impl Future<Output = Result<Value>>;

    // Provided methods
    fn prepare_node(
        &mut self,
        _node: &NodeIdentity,
        _name: &str,
    ) -> impl Future<Output = Result<()>> { ... }
    fn published(
        &mut self,
        _node: &NodeIdentity,
        _name: &str,
    ) -> impl Future<Output = Result<()>> { ... }
    fn prepare_service(
        &mut self,
        _service: &ServiceRelay,
    ) -> impl Future<Output = Result<()>> { ... }
    fn provision_service(
        &mut self,
        _runtime: &Path,
        _home: &Path,
        _service: &ServiceRelay,
    ) -> impl Future<Output = Result<()>> { ... }
}
Expand description

Implementations must authenticate the owner endpoint independently of Gent’s relay and protect the entire channel, including bootstrap metadata and tokens.

Required Methods§

Source

fn call(&mut self, action: PairingOp) -> impl Future<Output = Result<Value>>

Provided Methods§

Source

fn prepare_node( &mut self, _node: &NodeIdentity, _name: &str, ) -> impl Future<Output = Result<()>>

Invitation channels prove this persisted identity before requesting any snapshot. SSH peers already authenticate through the owner’s login.

Source

fn published( &mut self, _node: &NodeIdentity, _name: &str, ) -> impl Future<Output = Result<()>>

Called with the committed node while setup and daemon locks are held. A receipt failure must not invalidate an already-published installation.

Source

fn prepare_service( &mut self, _service: &ServiceRelay, ) -> impl Future<Output = Result<()>>

Source

fn provision_service( &mut self, _runtime: &Path, _home: &Path, _service: &ServiceRelay, ) -> impl Future<Output = Result<()>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§