ResourceManager class abstract
ResourceManager is the interface for managing resources in libp2p.
WARNING The ResourceManager interface is considered experimental and subject to change in subsequent releases.
- Implemented types
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> - Close closes the resource manager
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openConnection(
Direction dir, bool usefd, MultiAddr endpoint) → Future< ConnManagementScope> - OpenConnection creates a new connection scope not yet associated with any peer; the connection is scoped at the transient scope. The caller owns the returned scope and is responsible for calling Done in order to signify the end of the scope's span.
-
openStream(
PeerId peerId, Direction dir) → Future< StreamManagementScope> - OpenStream creates a new stream scope, initially unnegotiated. An unnegotiated stream will be initially unattached to any protocol scope and constrained by the transient scope. The caller owns the returned scope and is responsible for calling Done in order to signify the end of th scope's span.
-
toString(
) → String -
A string representation of this object.
inherited
-
viewPeer<
T> (PeerId peerId, Future< T> f(PeerScope scope)) → Future<T> -
ViewPeer views the resource management scope for a specific peer.
inherited
-
viewProtocol<
T> (ProtocolID protocol, Future< T> f(ProtocolScope scope)) → Future<T> -
ViewProtocol views the resource management scope for a specific protocol.
inherited
-
viewService<
T> (String service, Future< T> f(ServiceScope scope)) → Future<T> -
ViewService retrieves a service-specific scope.
inherited
-
viewSystem<
T> (Future< T> f(ResourceScope scope)) → Future<T> -
ViewSystem views the system-wide resource scope.
inherited
-
viewTransient<
T> (Future< T> f(ResourceScope scope)) → Future<T> -
ViewTransient views the transient (DMZ) resource scope.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited