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
+39
View File
@@ -0,0 +1,39 @@
package birdfmt
import (
"net/netip"
"sort"
"strings"
)
// RenderStaticIPv4Protocol renders a BIRD 2 `protocol static` block for IPv4 prefixes.
// Prefixes are sorted for stable output (golden tests, reproducible rev).
func RenderStaticIPv4Protocol(protocolName string, prefixes []netip.Prefix) string {
if protocolName == "" {
protocolName = "evobgp_static_v4"
}
uniq := make(map[string]netip.Prefix)
for _, p := range prefixes {
if !p.Addr().Is4() {
continue
}
uniq[p.String()] = p.Masked()
}
keys := make([]string, 0, len(uniq))
for k := range uniq {
keys = append(keys, k)
}
sort.Strings(keys)
var b strings.Builder
b.WriteString("protocol static ")
b.WriteString(protocolName)
b.WriteString(" {\n ipv4;\n")
for _, k := range keys {
b.WriteString(" route ")
b.WriteString(k)
b.WriteString(" unreachable;\n")
}
b.WriteString("}\n")
return b.String()
}