Class NodeRoutePlanner
- Namespace
- Nyra
- Assembly
- Nyra.dll
The IP route planner of a node.
public sealed class NodeRoutePlanner
- Inheritance
-
NodeRoutePlanner
- Inherited Members
Methods
FreeAddressAsync(string, CancellationToken)
Releases an address the route planner treats as failing back into rotation.
public Task FreeAddressAsync(string address, CancellationToken cancellationToken = default)
Parameters
addressstringThe address to release, as the status reported it.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task
A task that completes when the address was released.
Exceptions
- RestException
The server has no route planner configured, or rejected the address.
- IncompatibleServerException
The server's /v4/info version is not supported.
FreeAllAddressesAsync(CancellationToken)
Releases every address the route planner treats as failing back into rotation.
public Task FreeAllAddressesAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task
A task that completes when every address was released.
Exceptions
- RestException
The server has no route planner configured.
- IncompatibleServerException
The server's /v4/info version is not supported.
GetStatusAsync(CancellationToken)
Fetches the IP route planner status, the strategy, its IP block and the addresses it treats as failing.
public Task<RoutePlannerStatus> GetStatusAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<RoutePlannerStatus>
The status of the route planner.
Remarks
Served by both servers.
Exceptions
- RestException
The server has no route planner configured.
- IncompatibleServerException
The server's /v4/info version is not supported.