Documentation
¶
Index ¶
- Variables
- func GetMetricAppMeta() map[string]*metrics.AppMeta
- func ParseAppsFromArgs(args []string) (apps []string)
- func RegisterApp(appDef *AppDef)
- func RegisterFlags(cmd *cobra.Command) error
- func UserLog() *zapbox.CLILogger
- type App
- type AppDef
- type BoxConfig
- type Controller
- type DfuseConfig
- type Launcher
- func (l *Launcher) GetAppIDs() (resp []string)
- func (l *Launcher) GetAppStatus(appID string) pbdashboard.AppStatus
- func (l *Launcher) Launch(appNames []string) error
- func (l *Launcher) StoreAndStreamAppStatus(appID string, status pbdashboard.AppStatus)
- func (l *Launcher) SubscribeAppStatus() *subscription
- func (l *Launcher) UnsubscribeAppStatus(sub *subscription)
- func (l *Launcher) WaitForTermination()
- type LoggingDef
- type RuntimeModules
Constants ¶
This section is empty.
Variables ¶
View Source
var AppRegistry = map[string]*AppDef{}
View Source
var RegisterCommonFlags func(cmd *cobra.Command) error
Functions ¶
func GetMetricAppMeta ¶
func ParseAppsFromArgs ¶
func RegisterApp ¶
func RegisterApp(appDef *AppDef)
func RegisterFlags ¶
Types ¶
type AppDef ¶
type AppDef struct {
ID string
Title string
Description string
MetricsID string
Logger *LoggingDef
RegisterFlags func(cmd *cobra.Command) error
InitFunc func(modules *RuntimeModules) error
FactoryFunc func(modules *RuntimeModules) (App, error)
}
type BoxConfig ¶
type BoxConfig struct {
// Either GenesisJSON or GenesisFile
GenesisJSON string `yaml:"genesis_json"`
GenesisFile string `yaml:"genesis_file,omitempty"`
RunProducer bool `yaml:"run_producer"`
GeneratedPublicKey string `yaml:"generated_public_key,omitempty"`
GeneratedPrivateKey string `yaml:"generated_private_key,omitempty"`
ProducerConfigIni string `yaml:"producer_config_ini,omitempty"`
ProducerNodeVersion string `yaml:"producer_node_version,omitempty"`
ReaderConfigIni string `yaml:"reader_config_ini"`
ReaderNodeVersion string `yaml:"reader_node_version"`
Version string `yaml:"version"` // to determine if you need to dfuseeos init again
}
Configuration extracted from the `dfuse.yaml` file. User-driven.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(nodeosCommandURL string) *Controller
func (*Controller) NodeHealth ¶
func (c *Controller) NodeHealth() error
func (*Controller) StartNode ¶
func (c *Controller) StartNode() (string, error)
func (*Controller) StopNode ¶
func (c *Controller) StopNode() (string, error)
type DfuseConfig ¶
type DfuseConfig struct {
Start struct {
Args []string `json:"args"`
Flags map[string]string `json:"flags"`
} `json:"start"`
}
func ReadConfig ¶
func ReadConfig(filename string) (conf *DfuseConfig, err error)
Load reads a YAML config, and returns the raw JSON plus a top-level Config object. Use the raw JSON form to provide to the different plugins and apps for them to load their config.
type Launcher ¶
type Launcher struct {
*shutter.Shutter
FirstAppError error
// contains filtered or unexported fields
}
func NewLauncher ¶
func NewLauncher(config *DfuseConfig, modules *RuntimeModules) *Launcher
func (*Launcher) GetAppStatus ¶
func (l *Launcher) GetAppStatus(appID string) pbdashboard.AppStatus
func (*Launcher) StoreAndStreamAppStatus ¶
func (l *Launcher) StoreAndStreamAppStatus(appID string, status pbdashboard.AppStatus)
func (*Launcher) SubscribeAppStatus ¶
func (l *Launcher) SubscribeAppStatus() *subscription
func (*Launcher) UnsubscribeAppStatus ¶
func (l *Launcher) UnsubscribeAppStatus(sub *subscription)
func (*Launcher) WaitForTermination ¶
func (l *Launcher) WaitForTermination()
type LoggingDef ¶
func NewLoggingDef ¶
func NewLoggingDef(regex string, levels []zapcore.Level) *LoggingDef
type RuntimeModules ¶
type RuntimeModules struct {
SearchDmeshClient dmeshClient.SearchClient
MetricManager *metrics.Manager
Launcher *Launcher
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.