Table of Contents

Class RoutePlannerDetails

Namespace
Nyra.Entities
Assembly
Nyra.dll

Planner details.

public sealed record RoutePlannerDetails : IEquatable<RoutePlannerDetails>
Inheritance
RoutePlannerDetails
Implements
Inherited Members

Remarks

The strategy-specific members are present only for their strategies.

Properties

BlockIndex

Rotating-nano planner, current block index.

[JsonPropertyName("blockIndex")]
[JsonInclude]
public string? BlockIndex { get; }

Property Value

string

CurrentAddress

Rotating planner, the address currently in use, via InetAddress.toString() with a leading slash.

[JsonPropertyName("currentAddress")]
[JsonInclude]
public string? CurrentAddress { get; }

Property Value

string

Remarks

NodeLink always sends null here.

CurrentAddressIndex

Nano planner, the offset the current address was drawn at, rotating-nano, the same offset within the current /64 block.

[JsonPropertyName("currentAddressIndex")]
[JsonInclude]
public string? CurrentAddressIndex { get; }

Property Value

string

Remarks

Both are nano-time based, these planners switch address on every clock update.

FailingAddresses

The addresses that failed, with the failure and when.

[JsonPropertyName("failingAddresses")]
[JsonInclude]
public IReadOnlyList<FailingAddress>? FailingAddresses { get; }

Property Value

IReadOnlyList<FailingAddress>

IpBlock

The block the planner draws from, null when the server sent none.

[JsonPropertyName("ipBlock")]
[JsonInclude]
public RoutePlannerIpBlock? IpBlock { get; }

Property Value

RoutePlannerIpBlock

IpIndex

Rotating planner, current index inside the block.

[JsonPropertyName("ipIndex")]
[JsonInclude]
public string? IpIndex { get; }

Property Value

string

RotateIndex

Rotating planner, the number of rotations performed so far.

[JsonPropertyName("rotateIndex")]
[JsonInclude]
public string? RotateIndex { get; }

Property Value

string

Strategy

NodeLink reports the configured strategy (RotateOnBan, RoundRobin, LoadBalance) under this member, Lavalink does not send it.

[JsonPropertyName("strategy")]
[JsonInclude]
public string? Strategy { get; }

Property Value

string

Methods

Equals(RoutePlannerDetails?)

Indicates whether both details describe the same planner state.

public bool Equals(RoutePlannerDetails? other)

Parameters

other RoutePlannerDetails

The details to compare with.

Returns

bool

Whether the members match, the addresses compared by content.

GetHashCode()

Returns a hash of the scalar members, the addresses stay out of it.

public override int GetHashCode()

Returns

int

The hash code.