docs: enhance EvoBGP architecture plan with new risk mitigation strategies, testing matrix for BIRD2, and CI/CD workflow details. Updated section titles for clarity and added completed todos for deployment practices.
CI / openapi (push) Successful in 1m35s
CI / go (push) Failing after 16s
CI / bird2 (push) Has been skipped

This commit is contained in:
Denozordec
2026-04-04 01:27:17 +07:00
parent 4480d64a7f
commit 3992d01c3e
30 changed files with 621 additions and 2 deletions
+64
View File
@@ -0,0 +1,64 @@
package birdfmt
import (
"embed"
"io/fs"
"path"
"sort"
)
//go:embed testdata/scenarios
var scenariosFS embed.FS
// BirdScenarioPaths returns POSIX-style directory paths (under testdata/scenarios)
// that contain a bird.conf file, sorted for stable iteration.
func BirdScenarioPaths() ([]string, error) {
var dirs []string
err := fs.WalkDir(scenariosFS, "testdata/scenarios", func(p string, d fs.DirEntry, err error) error {
if err != nil {
return err
}
if d.IsDir() || d.Name() != "bird.conf" {
return nil
}
dir := path.Dir(p)
if dir == "testdata/scenarios" {
return nil
}
dirs = append(dirs, dir)
return nil
})
if err != nil {
return nil, err
}
sort.Strings(dirs)
return dirs, nil
}
// ScenarioBirdConfRel returns the path relative to module root internal/birdfmt/ for bird.conf.
func ScenarioBirdConfRel(scenarioDir string) string {
return path.Join(scenarioDir, "bird.conf")
}
// ReadScenarioBirdConf returns the contents of bird.conf for a scenario directory from embed.
func ReadScenarioBirdConf(scenarioDir string) ([]byte, error) {
return scenariosFS.ReadFile(path.Join(scenarioDir, "bird.conf"))
}
// RepoRelativeBirdConf is the path from the repository root (for CI / docker bind mounts).
func RepoRelativeBirdConf(scenarioDir string) string {
return path.Join("internal/birdfmt", scenarioDir, "bird.conf")
}
// AllScenarioNames returns leaf scenario names (last path segment) for tables / docs.
func AllScenarioNames() ([]string, error) {
paths, err := BirdScenarioPaths()
if err != nil {
return nil, err
}
names := make([]string, len(paths))
for i, p := range paths {
names[i] = path.Base(p)
}
return names, nil
}