[][src]Struct golem_rpc_api::net::GolemNet

pub struct GolemNet<'a, Inner: RpcEndpoint + ?Sized>(_);

Methods

impl<'a, Inner: RpcEndpoint + ?Sized + 'static> GolemNet<'a, Inner>[src]

pub fn get_node<'b>(
    &'b self
) -> impl Future<Item = NodeInfo, Error = Error> + 'static
[src]

RPC uri= net.ident

pub fn get_node_key<'b>(
    &'b self
) -> impl Future<Item = String, Error = Error> + 'static
[src]

RPC uri= net.ident.key

pub fn get_node_name<'b>(
    &'b self
) -> impl Future<Item = String, Error = Error> + 'static
[src]

RPC uri= net.ident.name

pub fn get_p2p_port<'b>(
    &'b self
) -> impl Future<Item = u16, Error = Error> + 'static
[src]

RPC uri= net.p2p.port

pub fn get_task_server_port<'b>(
    &'b self
) -> impl Future<Item = u16, Error = Error> + 'static
[src]

RPC uri= net.tasks.port

pub fn connection_status<'b>(
    &'b self
) -> impl Future<Item = NetStatus, Error = Error> + 'static
[src]

RPC uri= net.status

pub fn connect(
    &self,
    peer: (String, u16)
) -> impl Future<Item = (), Error = Error>
[src]

Connect to specific node

RPC uri= net.peer.connect

pub fn block_node(
    &self,
    node_id: String,
    timeout_seconds: i32
) -> impl Future<Item = (bool, Option<String>), Error = Error>
[src]

Params

  • timeout_seconds - (-1) for persistent disallow.

Returns:

  • (true, None) - if node is successively blocked.
  • (false, reason) - on error

RPC uri= net.peer.block

pub fn block_ip(
    &self,
    ip_addr: IpAddr,
    timeout_seconds: i32
) -> impl Future<Item = (), Error = Error>
[src]

RPC uri= net.peer.block_ip

pub fn allow_ip(
    &self,
    ip: IpAddr,
    timeout_seconds: i32
) -> impl Future<Item = (), Error = Error>
[src]

RPC uri= net.peer.allow_ip

pub fn allow_node(
    &self,
    node_id: String,
    timeout_seconds: i32
) -> impl Future<Item = (), Error = Error>
[src]

RPC uri= net.peer.allow

pub fn acl_status<'b>(
    &'b self
) -> impl Future<Item = AclStatus<String>, Error = Error> + 'static
[src]

RPC uri= net.peer.acl

pub fn acl_ip_status<'b>(
    &'b self
) -> impl Future<Item = AclStatus<IpAddr>, Error = Error> + 'static
[src]

RPC uri= net.peer.acl_ip

pub fn acl_setup(
    &self,
    default_rule: AclRule,
    exceptions: Vec<String>
) -> impl Future<Item = (), Error = Error>
[src]

RPC uri= net.peer.acl.new

pub fn get_known_peers<'b>(
    &'b self
) -> impl Future<Item = Vec<NodeInfo>, Error = Error> + 'static
[src]

RPC uri= net.peers.known

pub fn get_connected_peers<'b>(
    &'b self
) -> impl Future<Item = Vec<PeerInfo>, Error = Error> + 'static
[src]

RPC uri= net.peers.connected

Auto Trait Implementations

impl<'a, Inner: ?Sized> Send for GolemNet<'a, Inner> where
    Inner: Sync

impl<'a, Inner: ?Sized> Sync for GolemNet<'a, Inner> where
    Inner: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self