Documentation
¶
Overview ¶
Package node provides an easy way to access node related information.
Utility functions to generate names and directory paths encapsulate the package conventions. It is highly recommended to use this package when implementing a new package to achieve consistency across packages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct { // The global ID of this node ID string `json:"id"` // The plugin name PluginName string `json:"plugin"` // Dynamic (i.e. defined by the plugin) string parameters StrParameters map[string]string `json:"str_parameters"` // Dynamic bool parameters BoolParameters map[string]bool `json:"bool_parameters"` // Holding place for data that is generated at runtime. E.g. can be used to store data parsed from the parameters Data map[string]interface{} `json:"-"` // No json here, runtime data only // The package version used to install this node (if installed yet) // This is useful to know in order to run migrations on upgrades. Version string `json:"version"` // contains filtered or unexported fields }
Node represents a blockchain node, it's configuration and related information
func (Node) NamePrefix ¶
NamePrefix returns the prefix used as a convention when naming containers, volumes, networks, etc.
func (Node) NodeDirectory ¶
NodeDirectory returns the base directory under which all configuration and meta-data for this node is stored
func (Node) NodeFile ¶
NodeFile returns the filepath in which the base configuration as well as meta-data from the PBG is stored