Class NodeSwitch

Assembly: redb.Tsak.Web.dll

The nodes of the topology in the switcher's order (by group, then by node id), the filter, and the previous and
next node of the same group for the [ and ] keys.

public static class NodeSwitch

Inheritance

Object→NodeSwitch

Methods

Ago(DateTimeOffset, DateTimeOffset)

"3m ago", "2h ago", "4d ago": how long ago a down node was last heard of.

public static string Ago(DateTimeOffset at, DateTimeOffset now)

Entries(ClusterTopology?)

The topology's nodes, ordered by group then node id; a node leads when its group's leader is it.

public static IReadOnlyList<NodeSwitchEntry> Entries(ClusterTopology? topology)

Filter(IReadOnlyList<NodeSwitchEntry>, string?)

The entries whose node id or host name contains filter (any case); all for an empty filter.

public static IReadOnlyList<NodeSwitchEntry> Filter(IReadOnlyList<NodeSwitchEntry> entries, string? filter)

IsShown(IReadOnlyList<NodeSwitchEntry>)

Whether the switcher is shown at all: only with more than one node.

public static bool IsShown(IReadOnlyList<NodeSwitchEntry> entries)

Neighbour(IReadOnlyList<NodeSwitchEntry>, string?, int)

The node before (step = -1) or after (+1) current in its group, wrapping

public static string? Neighbour(IReadOnlyList<NodeSwitchEntry> entries, string? current, int step)