Add Cloud Map seeder discovery with VPC Lattice operator templates.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Agents poll AETHERFORGE_CLOUD_MAP_ENDPOINT to sync know_node gossip; deploy plans attach route_via DNS hints for standalone operator registries.
This commit is contained in:
@@ -38,4 +38,28 @@ func NormalizeRegistryDocument(doc RegistryDocument) (RegistryDocument, bool) {
|
||||
doc.Service = "seeder"
|
||||
}
|
||||
return doc, doc.Namespace != "" && doc.Service != ""
|
||||
}
|
||||
}
|
||||
|
||||
func KnowNodeTargets(doc RegistryDocument) []string {
|
||||
doc, ok := NormalizeRegistryDocument(doc)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
seen := make(map[string]bool)
|
||||
var out []string
|
||||
for _, inst := range doc.Instances {
|
||||
if !inst.Healthy {
|
||||
continue
|
||||
}
|
||||
id := strings.TrimSpace(inst.AgentID)
|
||||
if id == "" {
|
||||
id = strings.TrimSpace(inst.DNSName)
|
||||
}
|
||||
if id == "" || seen[id] {
|
||||
continue
|
||||
}
|
||||
seen[id] = true
|
||||
out = append(out, id)
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user