INNER CODE UNIT · Go
main
VersusControl/versus-incident · cmd/main.go:42
func main() {
err := c.LoadConfig("config/config.yaml")
if err != nil {
log.Fatalf("Failed to load config: %v", err)
}
cfg := c.GetConfig()
// Construct the durable storage provider once and inject everywhere
// that needs to persist (agent catalog/shadow, incident history). Today
// only the file backend is implemented; redis/database return
// storage.ErrUnsupported.
store, err := storage.New(storage.Config{
Type: cfg.Storage.Type,
File: storage.FileOptions{
MaxIncidents: cfg.Storage.File.MaxIncidents,
},
Redis: storage.RedisOptions{