feat(controller,app): add edge apps controller

This commit is contained in:
2023-03-03 20:37:09 +01:00
parent e13de5bd0d
commit bd0d5a621a
20 changed files with 862 additions and 36 deletions

View File

@ -19,6 +19,7 @@ type ControllersConfig struct {
Spec SpecControllerConfig `yaml:"spec"`
Gateway GatewayControllerConfig `yaml:"gateway"`
UCI UCIControllerConfig `yaml:"uci"`
App AppControllerConfig `yaml:"app"`
}
type PersistenceControllerConfig struct {
@ -39,6 +40,12 @@ type UCIControllerConfig struct {
ConfigBackupFile InterpolatedString `yaml:"configBackupFile"`
}
type AppControllerConfig struct {
Enabled InterpolatedBool `yaml:"enabled"`
DataDir InterpolatedString `yaml:"dataDir"`
DownloadDir InterpolatedString `yaml:"downloadDir"`
}
func NewDefaultAgentConfig() AgentConfig {
return AgentConfig{
ServerURL: "http://127.0.0.1:3000",
@ -60,6 +67,11 @@ func NewDefaultAgentConfig() AgentConfig {
ConfigBackupFile: "uci-backup.conf",
BinPath: "uci",
},
App: AppControllerConfig{
Enabled: true,
DataDir: "apps/data",
DownloadDir: "apps/bundles",
},
},
Collectors: []ShellCollectorConfig{
{