libp2p/protocols/connectivity/autonatv2/service

Search:
Group by:
Source   Edit  

Types

AutonatV2Service = ref object of Service
  config*: AutonatV2ServiceConfig
  networkReachability*: NetworkReachability
  client*: AutonatV2Client
Source   Edit  
StatusAndConfidenceHandler = proc (networkReachability: NetworkReachability;
                                   confidence: Opt[float]): Future[void] {.
    ...gcsafe, async: (...raises: [CancelledError]).}
Source   Edit  

Procs

proc new(T: typedesc[AutonatV2Service]; rng: ref HmacDrbgContext;
         client: AutonatV2Client = AutonatV2Client.new();
         config: AutonatV2ServiceConfig = AutonatV2ServiceConfig.new()): T:type {.
    ...raises: [].}
Source   Edit  
proc new(T: typedesc[AutonatV2ServiceConfig];
         scheduleInterval: Opt[Duration] = noneDuration;
         askNewConnectedPeers = true; numPeersToAsk: int = 5;
         maxQueueSize: int = 10; minConfidence: float = 0.3;
         enableAddressMapper = true): T:type {....raises: [].}
Source   Edit  
proc setStatusAndConfidenceHandler(self: AutonatV2Service;
    statusAndConfidenceHandler: StatusAndConfidenceHandler) {....raises: [],
    tags: [], forbids: [].}
Source   Edit  

Methods

method run(self: AutonatV2Service; switch: Switch): InternalRaisesFuture[void,
    (CancelledError,)] {.public, ...stackTrace: false, raises: [], gcsafe,
                         raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
method setup(self: AutonatV2Service; switch: Switch): InternalRaisesFuture[bool,
    (CancelledError,)] {....stackTrace: false, raises: [], gcsafe, raises: [],
                         tags: [RootEffect], forbids: [].}
Source   Edit  
method stop(self: AutonatV2Service; switch: Switch): InternalRaisesFuture[bool,
    (CancelledError,)] {.public, ...stackTrace: false, raises: [], gcsafe,
                         raises: [], tags: [RootEffect], forbids: [].}
Source   Edit