feat(store): persist the Swarm cluster id of each agent
The Ledger UI groups Swarm services under their cluster and lists the cluster's managers, so the master needs to know which cluster an agent belongs to. RecordHello now stores hello.SwarmClusterID in the new agents.swarm_cluster_id column. Claude-Session: https://claude.ai/code/session_01GAZsp3P7Qto6JnhipxWUJQ
This commit is contained in:
@@ -27,9 +27,12 @@ type Agent struct {
|
||||
Hostname string
|
||||
AgentVersion string
|
||||
SwarmManager bool
|
||||
LastSeenAt *time.Time
|
||||
RevokedAt *time.Time
|
||||
CreatedAt time.Time
|
||||
// SwarmClusterID is the Swarm cluster the agent's daemon was in when it last
|
||||
// connected; "" outside a swarm.
|
||||
SwarmClusterID string
|
||||
LastSeenAt *time.Time
|
||||
RevokedAt *time.Time
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
// Service is one service as last reported by an agent.
|
||||
|
||||
Reference in New Issue
Block a user