nodelogs

package
v0.0.0-...-84f175e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRoutes

func ApplyRoutes(r *gin.RouterGroup)

func GetActiveDuration

func GetActiveDuration(peerID string, startTime, endTime time.Time) (time.Duration, error)

GetActiveDuration fetches the active duration of a node between two timestamps

func GetActiveNodes

func GetActiveNodes(startTime, endTime time.Time) ([]string, error)

GetActiveNodes fetches all nodes that were active during a specific time range

func GetActiveNodesHandler

func GetActiveNodesHandler(c *gin.Context)

GetActiveNodesHandler retrieves active nodes within a specific time range

func GetTotalActiveDuration

func GetTotalActiveDuration(peerID string, startTime time.Time, endTime time.Time) (int64, error)

GetTotalActiveDuration calculates the total duration (in seconds) that a node with a given PeerID was active

func LogNodeStatus

func LogNodeStatus(peerID string, status string) error

LogNodeStatus logs the status change of a node

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL