dashboard

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2021 License: Apache-2.0, BSD-2-Clause Imports: 31 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// MsgTypePing defines a ping message type.
	MsgTypePing byte = iota
	// MsgTypeFPC defines a FPC update message.
	MsgTypeFPC
	// MsgTypeAddNode defines an addNode update message for autopeering visualizer.
	MsgTypeAddNode
	// MsgTypeRemoveNode defines a removeNode update message for autopeering visualizer.
	MsgTypeRemoveNode
	// MsgTypeConnectNodes defines a connectNodes update message for autopeering visualizer.
	MsgTypeConnectNodes
	// MsgTypeDisconnectNodes defines a disconnectNodes update message for autopeering visualizer.
	MsgTypeDisconnectNodes
)
View Source
const PluginName = "AnalysisDashboard"

PluginName is the name of the dashboard plugin.

Variables

View Source
var ErrForbidden = errors.New("forbidden")

ErrForbidden defines the forbidden error.

View Source
var ErrInternalError = errors.New("internal error")

ErrInternalError defines the internal error.

View Source
var ErrInvalidParameter = errors.New("invalid parameter")

ErrInvalidParameter defines the invalid parameter error.

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound defines the not found error.

View Source
var Parameters = &ParametersDefinition{}

Parameters contains the configuration parameters of the dashboard plugin.

View Source
var (
	// Plugin is the plugin instance of the dashboard plugin.
	Plugin = node.NewPlugin(PluginName, deps, node.Disabled, configure, run)
)

Functions

This section is empty.

Types

type FPCRecord

type FPCRecord struct {
	// ConflictID defines the ID of the conflict.
	ConflictID string `json:"conflictid" bson:"conflictid"`
	// NodeID defines the ID of the node.
	NodeID string `json:"nodeid" bson:"nodeid"`
	// Rounds defines number of rounds performed to finalize the conflict.
	Rounds int `json:"rounds" bson:"rounds"`
	// Opinions contains the opinion of each round.
	Opinions []int32 `json:"opinions" bson:"opinions"`
	// Outcome defines final opinion of the conflict.
	Outcome int32 `json:"outcome" bson:"outcome"`
	// Time defines the time when the conflict has been finalized.
	Time primitive.DateTime `json:"datetime" bson:"datetime"`
}

FPCRecord defines the FPC record to be stored into a mongoDB.

type FPCRecords

type FPCRecords = []FPCRecord

FPCRecords defines a slice of FPCRecord

type FPCUpdate

type FPCUpdate struct {
	Conflicts conflictSet `json:"conflictset" bson:"conflictset"`
}

FPCUpdate contains an FPC update.

type ParametersDefinition added in v0.7.6

type ParametersDefinition struct {
	// BindAddress defines the analysis dashboard binding address.
	BindAddress string `default:"0.0.0.0:8000" usage:"the bind address of the analysis dashboard"`
	// Dev defines the analysis dashboard dev mode.
	Dev bool `default:"false" usage:"whether the analysis dashboard runs in dev mode"`
	// BasicAuthEnabled defines  the analysis dashboard basic auth enabler.
	BasicAuthEnabled bool `default:"false" usage:"whether to enable HTTP basic auth"`
	// BasicAuthUsername defines the analysis dashboard basic auth username.
	BasicAuthUsername string `default:"goshimmer" usage:"HTTP basic auth username"`
	// BasicAuthPassword defines the analysis dashboard basic auth password.
	BasicAuthPassword string `default:"goshimmer" usage:"HTTP basic auth password"`
	// MongoDBEnabled defines the analysis dashboard to enable mongoDB.
	MongoDBEnabled bool `default:"false" usage:"whether to enable MongoDB"`
	// MongoDBUsername defines the analysis dashboard mongoDB username.
	MongoDBUsername string `default:"root" usage:"MongoDB username"`
	// MongoDBPassword defines the analysis dashboard mongoDB password.
	MongoDBPassword string `default:"password" usage:"MongoDB username"`
	// MongoDBHostAddress defines the analysis dashboard mongoDB binding address.
	MongoDBHostAddress string `default:"mongodb:27017" usage:"MongoDB host address"`
	// ManaDashboardAddress defines the mana dashboard address to stream mana info from.
	ManaDashboardAddress string `default:"http://127.0.0.1:8081" usage:"dashboard host address"`
}

ParametersDefinition contains the definition of the parameters used by the dasbhoard plugin.

Jump to

Keyboard shortcuts

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