launcher

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppRegistry = map[string]*AppDef{}

Functions

func GetMetricAppMeta

func GetMetricAppMeta() map[string]*metrics.AppMeta

func RegisterApp

func RegisterApp(appDef *AppDef)

func RegisterFlags

func RegisterFlags(cmd *cobra.Command) error

func UserLog

func UserLog() *zapbox.CLILogger

Types

type App

type App interface {
	Terminating() <-chan struct{}
	Terminated() <-chan struct{}
	Shutdown(err error)
	Err() error
	Run() error
}

type AppDef

type AppDef struct {
	ID            string
	Title         string
	Description   string
	MetricsID     string
	Logger        *LoggingDef
	RegisterFlags func(cmd *cobra.Command) error
	InitFunc      func(config *BoxConfig, modules *RuntimeModules) error
	FactoryFunc   func(config *BoxConfig, 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.

func ReadConfig

func ReadConfig(filename string) (conf *BoxConfig, 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 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 EOSFolderStructure

type EOSFolderStructure struct {
	Base        string
	StorageRoot string

	ManagerNode          *EOSNodeFolders
	MindreaderNode       *EOSNodeFolders
	Storage              *StorageFolders
	MindReaderWorkingDir string
	MergerWorkingDir     string
	KVDBWorkingDir       string
	FluxWorkingDir       string
	SearchWorkingDir     string
}

func NewEOSFolderStructure

func NewEOSFolderStructure(userBase string) *EOSFolderStructure

func (EOSFolderStructure) ConfigDirs

func (s EOSFolderStructure) ConfigDirs() []string

func (EOSFolderStructure) DataDirs

func (s EOSFolderStructure) DataDirs() []string

type EOSNodeFolders

type EOSNodeFolders struct {
	Config string
	Data   string
}

type Launcher

type Launcher struct {
	*shutter.Shutter
	// contains filtered or unexported fields
}

func NewLauncher

func NewLauncher(config *BoxConfig, modules *RuntimeModules) *Launcher

func (*Launcher) GetAppIDs

func (l *Launcher) GetAppIDs() (resp []string)

func (*Launcher) GetAppStatus

func (l *Launcher) GetAppStatus(appID string) pbdashboard.AppStatus

func (*Launcher) Launch

func (l *Launcher) Launch(appNames []string) error

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

type LoggingDef struct {
	Title  string
	Levels []zapcore.Level
	Regex  string
}

type RuntimeConfig

type RuntimeConfig struct {
	BoxConfig *BoxConfig

	DmeshServiceVersion      string
	DmeshNamespace           string
	DataDir                  string
	MergerServingAddr        string
	AbiServingAddr           string
	RelayerServingAddr       string
	BlockmetaServingAddr     string
	ShardSize                uint64
	StartBlock               uint64
	StopBlock                uint64
	FluxDBServingAddr        string
	IndexerServingAddr       string
	IndexerHTTPServingAddr   string
	ArchiveServingAddr       string
	ArchiveHTTPServingAddr   string
	LiveServingAddr          string
	RouterServingAddr        string
	RouterHTTPServingAddr    string
	DgraphqlHTTPServingAddr  string
	EoswsHTTPServingAddr     string
	DgraphqlGrpcServingAddr  string
	DashboardGrpcServingAddr string
	DashboardHTTPListenAddr  string
	KvdbDSN                  string
	FluxDSN                  string
	Protocol                 pbbstream.Protocol
	NodeExecutable           string
	NodeosAPIAddr            string
	MindreaderNodeosAPIAddr  string
	EosManagerHTTPAddr       string
	EosMindreaderHTTPAddr    string
	MindreaderGRPCAddr       string
	BootstrapDataURL         string
	NodeosTrustedProducer    string
	NodeosShutdownDelay      time.Duration
	NodeosExtraArgs          []string
	KvdbHTTPServingAddr      string
	EosqHTTPServingAddr      string
	NetworkID                string
}

type RuntimeModules

type RuntimeModules struct {
	SearchDmeshClient dmeshClient.SearchClient
	MetricManager     *metrics.Manager
	Launcher          *Launcher
}

type StorageFolders

type StorageFolders struct {
	Mergedblocks string
	Oneblock     string
	Indexes      string
	Pitreos      string
	Snapshots    string
	AbiCache     string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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