info

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: Apache-2.0, BSD-2-Clause Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const PluginName = "WebAPI info Endpoint"

PluginName is the name of the web API info endpoint plugin.

Variables

This section is empty.

Functions

func Plugin

func Plugin() *node.Plugin

Plugin gets the plugin instance.

Types

type Beacon added in v0.2.2

type Beacon struct {
	PublicKey string `json:"public_key"`
	MsgID     string `json:"msg_id"`
	SentTime  int64  `json:"sent_time"`
	Synced    bool   `json:"synced"`
}

Beacon contains a sync beacons detailed status.

type Mana added in v0.5.0

type Mana struct {
	Access             float64   `json:"access"`
	AccessTimestamp    time.Time `json:"accessTimestamp"`
	Consensus          float64   `json:"consensus"`
	ConsensusTimestamp time.Time `json:"consensusTimestamp"`
}

Mana contains the different mana values of the node.

type Response

type Response struct {
	// version of GoShimmer
	Version string `json:"version,omitempty"`
	// Network Version of the autopeering
	NetworkVersion uint32 `json:"networkVersion,omitempty"`
	// whether the node is synchronized
	Synced bool `json:"synced"`
	// sync beacons status
	Beacons []Beacon `json:"beacons"`
	// identity ID of the node encoded in base58
	IdentityID string `json:"identityID,omitempty"`
	// identity ID of the node encoded in base58 and truncated to its first 8 bytes
	IdentityIDShort string `json:"identityIDShort,omitempty"`
	// public key of the node encoded in base58
	PublicKey string `json:"publicKey,omitempty"`
	// MessageRequestQueueSize is the number of messages a node is trying to request from neighbors.
	MessageRequestQueueSize int `json:"messageRequestQueueSize,omitempty"`
	// SolidMessageCount is the number of solid messages in the node's database.
	SolidMessageCount int `json:"solidMessageCount,omitempty"`
	// TotalMessageCount is the number of messages in the node's database.
	TotalMessageCount int `json:"totalMessageCount,omitempty"`
	// list of enabled plugins
	EnabledPlugins []string `json:"enabledPlugins,omitempty"`
	// list if disabled plugins
	DisabledPlugins []string `json:"disabledPlugins,omitempty"`
	// Mana values
	Mana Mana `json:"mana,omitempty"`
	// ManaDecay is the decay coefficient of bm2.
	ManaDecay float64 `json:"mana_decay"`
	// error of the response
	Error string `json:"error,omitempty"`
}

Response holds the response of the GET request.

Jump to

Keyboard shortcuts

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