...
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package heroagent
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.ourworld.tf/herocode/heroagent/pkg/servers/ui"
|
||||
"git.ourworld.tf/herocode/heroagent/pkg/servers/webdavserver"
|
||||
)
|
||||
@@ -16,10 +18,14 @@ type Config struct {
|
||||
// UI server configuration
|
||||
UI UIConfig
|
||||
|
||||
// Job management configuration
|
||||
Jobs JobsConfig
|
||||
|
||||
// Enable/disable specific servers
|
||||
EnableRedis bool
|
||||
EnableWebDAV bool
|
||||
EnableUI bool
|
||||
EnableJobs bool
|
||||
}
|
||||
|
||||
// RedisConfig holds the configuration for the Redis server
|
||||
@@ -42,6 +48,16 @@ type UIConfig struct {
|
||||
AppConfig ui.AppConfig
|
||||
}
|
||||
|
||||
// JobsConfig holds the configuration for the job management system
|
||||
type JobsConfig struct {
|
||||
// OurDB configuration
|
||||
OurDBPath string
|
||||
|
||||
// Job processing configuration
|
||||
WorkerCount int
|
||||
QueuePollInterval time.Duration
|
||||
}
|
||||
|
||||
// DefaultConfig returns the default configuration for the HeroAgent
|
||||
func DefaultConfig() Config {
|
||||
return Config{
|
||||
@@ -56,8 +72,14 @@ func DefaultConfig() Config {
|
||||
Port: "9001", // Port is a string in UIConfig
|
||||
AppConfig: ui.AppConfig{},
|
||||
},
|
||||
Jobs: JobsConfig{
|
||||
OurDBPath: "./data/ourdb",
|
||||
WorkerCount: 5,
|
||||
QueuePollInterval: 100 * time.Millisecond,
|
||||
},
|
||||
EnableRedis: true,
|
||||
EnableWebDAV: true,
|
||||
EnableUI: true,
|
||||
EnableJobs: true,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user