GossipNode<T> class

Node information in the gossip network

Constructors

GossipNode({required String nodeId, required String address, required int port, required DateTime lastSeen, required GossipNodeState state, Map<String, dynamic> metadata = const {}})
const
GossipNode.fromJson(Map<String, dynamic> json)
Creates node from JSON
factory

Properties

address String
final
hashCode int
The hash code for this object.
no setteroverride
isAlive bool
Checks if node is considered alive
no setter
isDead bool
Checks if node is considered dead
no setter
isSuspect bool
Checks if node is considered suspect
no setter
lastSeen DateTime
final
metadata Map<String, dynamic>
final
nodeId String
final
port int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state GossipNodeState
final

Methods

copyWith({String? nodeId, String? address, int? port, DateTime? lastSeen, GossipNodeState? state, Map<String, dynamic>? metadata}) GossipNode<T>
Creates a copy with updated fields
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes node to JSON
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override