[][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<Output = Result<NodeInfo, Error>> + 'static
[src]

Calls net.ident RPC URI.

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

Calls net.ident.key RPC URI.

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

Calls net.ident.name RPC URI.

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

Calls net.p2p.port RPC URI.

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

Calls net.tasks.port RPC URI.

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

Calls net.status RPC URI.

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

Connect to specific node

Calls net.peer.connect RPC URI.

pub fn block_node(
    &self,
    node_id: Vec<String>,
    timeout_seconds: i32
) -> impl Future<Output = Result<ACLResult, Error>>
[src]

Params

  • timeout_seconds - (-1) for persistent disallow.

Returns:

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

Calls net.peer.block RPC URI.

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

Calls net.peer.block_ip RPC URI.

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

Calls net.peer.allow_ip RPC URI.

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

Calls net.peer.allow RPC URI.

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

Calls net.peer.acl RPC URI.

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

Calls net.peer.acl_ip RPC URI.

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

Calls net.peer.acl.new RPC URI.

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

Calls net.peers.known RPC URI.

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

Calls net.peers.connected RPC URI.

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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<V, T> VZip<V> for T where
    V: MultiLane<T>,