Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeStatus ¶
type NodeStatus struct { PeerID string `json:"peerId"` FirstJoined time.Time `json:"firstJoined"` LastJoined time.Time `json:"lastJoined"` LastLeft time.Time `json:"lastLeft"` LastUpdated time.Time `json:"lastUpdated"` CurrentUptime time.Duration `json:"currentUptime"` ReadableCurrentUptime string `json:"readableCurrentUptime"` AccumulatedUptime time.Duration `json:"accumulatedUptime"` ReadableAccumulatedUptime string `json:"readableAccumulatedUptime"` IsActive bool `json:"isActive"` IsStaked bool `json:"isStaked"` IsWriterNode bool `json:"isWriterNode"` }
type SubscriptionHandler ¶
type SubscriptionHandler struct { NodeStatus []NodeStatus NodeStatusTopic *pubsub.Topic NodeStatusCh chan []byte // contains filtered or unexported fields }
SubscriptionHandler handles storing node status updates and publishing them to the node status topic.
func (*SubscriptionHandler) HandleMessage ¶
func (handler *SubscriptionHandler) HandleMessage(message *pubsub.Message)
HandleMessage implement subscription handler here
Click to show internal directories.
Click to hide internal directories.