dashboard

package
Version: v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Overview

You can use the "packr clean" command to clean up this, and any other packr generated files.

Index

Constants

View Source
const (
	// CfgNodeAlias set an alias to identify a node
	CfgNodeAlias = "node.alias"
	// the bind address on which the dashboard can be access from
	CfgDashboardBindAddress = "dashboard.bindAddress"
	// whether to run the dashboard in dev mode
	CfgDashboardDevMode = "dashboard.dev"
	// how long the auth session should last before expiring
	CfgDashboardAuthSessionTimeout = "dashboard.auth.sessionTimeout"
	// the auth username
	CfgDashboardAuthUsername = "dashboard.auth.username"
	// the auth password+salt as a scrypt hash
	CfgDashboardAuthPasswordHash = "dashboard.auth.passwordHash"
	// the auth salt used for hashing the password
	CfgDashboardAuthPasswordSalt = "dashboard.auth.passwordSalt"
)
View Source
const (
	WebsocketCmdRegister   = 0
	WebsocketCmdUnregister = 1
)
View Source
const (
	// MsgTypeSyncStatus is the type of the SyncStatus message.
	MsgTypeSyncStatus byte = iota
	// MsgTypePublicNodeStatus is the type of the PublicNodeStatus message.
	MsgTypePublicNodeStatus = 1
	// MsgTypeNodeStatus is the type of the NodeStatus message.
	MsgTypeNodeStatus = 2
	// MsgTypeMPSMetric is the type of the messages per second (MPS) metric message.
	MsgTypeMPSMetric = 3
	// MsgTypeTipSelMetric is the type of the TipSelMetric message.
	MsgTypeTipSelMetric = 4
	// MsgTypeMs is the type of the Ms message.
	MsgTypeMs = 5
	// MsgTypePeerMetric is the type of the PeerMetric message.
	MsgTypePeerMetric = 6
	// MsgTypeConfirmedMsMetrics is the type of the ConfirmedMsMetrics message.
	MsgTypeConfirmedMsMetrics = 7
	// MsgTypeVertex is the type of the Vertex message for the visualizer.
	MsgTypeVertex = 8
	// MsgTypeSolidInfo is the type of the SolidInfo message for the visualizer.
	MsgTypeSolidInfo = 9
	// MsgTypeConfirmedInfo is the type of the ConfirmedInfo message for the visualizer.
	MsgTypeConfirmedInfo = 10
	// MsgTypeMilestoneInfo is the type of the MilestoneInfo message for the visualizer.
	MsgTypeMilestoneInfo = 11
	// MsgTypeTipInfo is the type of the TipInfo message for the visualizer.
	MsgTypeTipInfo = 12
	// MsgTypeDatabaseSizeMetric is the type of the database Size message for the metrics.
	MsgTypeDatabaseSizeMetric = 13
	// MsgTypeDatabaseCleanupEvent is the type of the database cleanup message for the metrics.
	MsgTypeDatabaseCleanupEvent = 14
	// MsgTypeSpamMetrics is the type of the SpamMetric message.
	MsgTypeSpamMetrics = 15
	// MsgTypeAvgSpamMetrics is the type of the AvgSpamMetric message.
	MsgTypeAvgSpamMetrics = 16
)
View Source
const (
	VisualizerIdLength = 7
)

Variables

View Source
var (
	// ErrInvalidParameter defines the invalid parameter error.
	ErrInvalidParameter = echo.ErrBadRequest

	// ErrInternalError defines the internal error.
	ErrInternalError = echo.ErrInternalServerError

	// ErrNotFound defines the not found error.
	ErrNotFound = echo.ErrNotFound

	// ErrForbidden defines the forbidden error.
	ErrForbidden = echo.ErrForbidden
)
View Source
var (
	Plugin *node.Plugin
)

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Size int `json:"size"`
}

Cache represents metrics about a cache.

type CachesMetric

type CachesMetric struct {
	RequestQueue             Cache `json:"request_queue"`
	Children                 Cache `json:"children"`
	Milestones               Cache `json:"milestones"`
	Messages                 Cache `json:"messages"`
	IncomingMessageWorkUnits Cache `json:"incoming_message_work_units"`
}

CachesMetric represents cache metrics.

type DBSizeMetric

type DBSizeMetric struct {
	Total    int64
	Snapshot int64
	Time     time.Time
}

DBSizeMetric represents database size metrics.

func (*DBSizeMetric) MarshalJSON

func (s *DBSizeMetric) MarshalJSON() ([]byte, error)

type LivefeedMilestone

type LivefeedMilestone struct {
	MessageID string          `json:"messageID"`
	Index     milestone.Index `json:"index"`
}

LivefeedMilestone represents a milestone for the livefeed.

type MemMetrics

type MemMetrics struct {
	Sys          uint64 `json:"sys"`
	HeapSys      uint64 `json:"heap_sys"`
	HeapInuse    uint64 `json:"heap_inuse"`
	HeapIdle     uint64 `json:"heap_idle"`
	HeapReleased uint64 `json:"heap_released"`
	HeapObjects  uint64 `json:"heap_objects"`
	MSpanInuse   uint64 `json:"m_span_inuse"`
	MCacheInuse  uint64 `json:"m_cache_inuse"`
	StackSys     uint64 `json:"stack_sys"`
	NumGC        uint32 `json:"num_gc"`
	LastPauseGC  uint64 `json:"last_pause_gc"`
}

MemMetrics represents memory metrics.

type Msg

type Msg struct {
	Type byte        `json:"type"`
	Data interface{} `json:"data"`
}

Msg represents a websocket message.

type NodeStatus

type NodeStatus struct {
	Version                string          `json:"version"`
	LatestVersion          string          `json:"latest_version"`
	Uptime                 int64           `json:"uptime"`
	NodeID                 string          `json:"node_id"`
	NodeAlias              string          `json:"node_alias"`
	ConnectedPeersCount    int             `json:"connected_peers_count"`
	CurrentRequestedMs     milestone.Index `json:"current_requested_ms"`
	RequestQueueQueued     int             `json:"request_queue_queued"`
	RequestQueuePending    int             `json:"request_queue_pending"`
	RequestQueueProcessing int             `json:"request_queue_processing"`
	RequestQueueAvgLatency int64           `json:"request_queue_avg_latency"`
	ServerMetrics          *ServerMetrics  `json:"server_metrics"`
	Mem                    *MemMetrics     `json:"mem"`
	Caches                 *CachesMetric   `json:"caches"`
}

NodeStatus represents the node status.

type PublicNodeStatus

type PublicNodeStatus struct {
	SnapshotIndex milestone.Index `json:"snapshot_index"`
	PruningIndex  milestone.Index `json:"pruning_index"`
	IsHealthy     bool            `json:"is_healthy"`
	IsSynced      bool            `json:"is_synced"`
}

PublicNodeStatus represents the public node status.

type ServerMetrics

type ServerMetrics struct {
	AllMessages          uint32 `json:"all_msgs"`
	NewMessages          uint32 `json:"new_msgs"`
	KnownMessages        uint32 `json:"known_msgs"`
	InvalidMessages      uint32 `json:"invalid_msgs"`
	InvalidRequests      uint32 `json:"invalid_req"`
	ReceivedMessageReq   uint32 `json:"rec_msg_req"`
	ReceivedMilestoneReq uint32 `json:"rec_ms_req"`
	ReceivedHeartbeats   uint32 `json:"rec_heartbeat"`
	SentMessages         uint32 `json:"sent_msgs"`
	SentMessageReq       uint32 `json:"sent_msg_req"`
	SentMilestoneReq     uint32 `json:"sent_ms_req"`
	SentHeartbeats       uint32 `json:"sent_heartbeat"`
	DroppedSentPackets   uint32 `json:"dropped_sent_packets"`
	SentSpamMsgsCount    uint32 `json:"sent_spam_messages"`
	ValidatedMessages    uint32 `json:"validated_messages"`
}

ServerMetrics are global metrics of the server.

type SyncStatus

type SyncStatus struct {
	CMI milestone.Index `json:"cmi"`
	LMI milestone.Index `json:"lmi"`
}

SyncStatus represents the node sync status.

Directories

Path Synopsis
You can use the "packr2 clean" command to clean up this, and any other packr generated files.
You can use the "packr2 clean" command to clean up this, and any other packr generated files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to