pub struct Processor {
    pub swarm: Arc<Swarm>,
    pub stabilization: Arc<Stabilization>,
}
Expand description

Processor for rings-node jsonrpc server

Fields§

§swarm: Arc<Swarm>

a swarm instance

§stabilization: Arc<Stabilization>

a stabilization instance,

Implementations§

Generate Signature for Authorization

verify signature will throw error when signature is illegal

Get current did

Create an Offer and waiting for connection. The process of manually handshake is:

  1. PeerA: create_offer
  2. PeerA: send the handshake info to PeerB.
  3. PeerB: answer_offer
  4. PeerB: send the handshake info to PeerA.
  5. PeerA: accept_answer.

Connect peer with remote rings-node jsonrpc server.

  • peer_url: the remote rings-node jsonrpc server url.

Answer an Offer. The process of manually handshake is:

  1. PeerA: create_offer
  2. PeerA: send the handshake info to PeerB.
  3. PeerB: answer_offer
  4. PeerB: send the handshake info to PeerA.
  5. PeerA: accept_answer.

Connect peer with web3 did. There are 3 peers: PeerA, PeerB, PeerC.

  1. PeerA has a connection with PeerB.
  2. PeerC has a connection with PeerB.
  3. PeerC can connect PeerA with PeerA’s web3 address.

Accept an answer of a connection. The process of manually handshake is:

  1. PeerA: create_offer
  2. PeerA: send the handshake info to PeerB.
  3. PeerB: answer_offer
  4. PeerB: send the handshake info to PeerA.
  5. PeerA: accept_answer.

List all peers.

Get peer by remote did

Disconnect a peer with web3 did.

List all pending transport.

Close pending transport

Send custom message to a did.

send http request message to node

  • destination: did of destination
  • url: ipfs url
  • timeout: timeout in millisecond

send simple text message

  • destination: did of destination
  • text: text message

check local cache of dht

fetch virtual node from DHT

store virtual node on DHT

append data to a virtual node on DHT

register service

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Attaches the current Context to this type, returning a WithContext wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more