Beispiel #1
0
 public ChannelReader <WorkerResponse <TracerouteResponse> > Traceroute(
     PingRequest request,
     CancellationToken cancellationToken
     )
 {
     return(_serviceProvider.GetRequiredService <TracerouteRunner>()
            .Run(new TracerouteRequest
     {
         Host = request.Host,
         Protocol = request.Protocol
     }, Clients.Caller, request.Workers, cancellationToken));
 }
Beispiel #2
0
 public ChannelReader <WorkerResponse <PingResponse> > Ping(
     PingRequest request,
     CancellationToken cancellationToken
     )
 {
     return(new GenericRunner <PingRequest, PingResponse>(
                _workerProvider,
                client => client.Ping(new Worker.PingRequest
     {
         Host = request.Host,
         Protocol = request.Protocol
     }, cancellationToken: cancellationToken)).Run(request, Clients.Caller, request.Workers, cancellationToken));
 }
Beispiel #3
0
        public ChannelReader <WorkerResponse <MtrResponse> > Mtr(
            PingRequest request,
            CancellationToken cancellationToken
            )
        {
            var workers = request.Workers ?? new[] { _defaultWorker }.ToImmutableHashSet();

            return(_serviceProvider.GetRequiredService <MtrRunner>()
                   .Run(new TracerouteRequest
            {
                Host = request.Host,
                Protocol = request.Protocol
            }, Clients.Caller, workers, cancellationToken));
        }