Documentation ¶
Index ¶
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type ChainMessage
- type Chart
- type ChartEntry
- type Config
- type Dashboard
- type HomeMessage
- type LogsMessage
- type Message
- type NetworkMessage
- type SystemMessage
- type TxPoolMessage
Constants ¶
This section is empty.
Variables ¶
var DefaultConfig = Config{ Host: "localhost", Port: 8080, Refresh: 3 * time.Second, }
DefaultConfig contains default settings for the dashboard.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type ChainMessage ¶
type ChainMessage struct { }
type Chart ¶
type Chart struct { History []*ChartEntry `json:"history,omitempty"` New *ChartEntry `json:"new,omitempty"` }
type ChartEntry ¶
type Config ¶
type Config struct { // Host is the host interface on which to start the dashboard server. If this // field is empty, no dashboard will be started. Host string `toml:",omitempty"` // Port is the TCP port number on which to start the dashboard server. The // default zero value is/ valid and will pick a port number randomly (useful // for ephemeral nodes). Port int `toml:",omitempty"` // Refresh is the refresh rate of the data updates, the chartEntry will be collected this often. Refresh time.Duration `toml:",omitempty"` // Assets offers a possibility to manually set the dashboard website's location on the server side. // It is useful for debugging, avoids the repeated generation of the binary. Assets string `toml:",omitempty"` }
Config contains the configuration parameters of the dashboard.
type Dashboard ¶
type Dashboard struct {
// contains filtered or unexported fields
}
Dashboard contains the dashboard internals.
type HomeMessage ¶
type LogsMessage ¶
type LogsMessage struct {
Log string `json:"log,omitempty"`
}
type Message ¶
type Message struct { Home *HomeMessage `json:"home,omitempty"` Chain *ChainMessage `json:"chain,omitempty"` TxPool *TxPoolMessage `json:"txpool,omitempty"` Network *NetworkMessage `json:"network,omitempty"` System *SystemMessage `json:"system,omitempty"` Logs *LogsMessage `json:"logs,omitempty"` }
type NetworkMessage ¶
type NetworkMessage struct { }
type SystemMessage ¶
type SystemMessage struct { }
type TxPoolMessage ¶
type TxPoolMessage struct { }