diff --git a/internal/app/ptah-agent/ptah_client.go b/internal/app/ptah-agent/ptah_client.go index d8816e5..afb9a4f 100644 --- a/internal/app/ptah-agent/ptah_client.go +++ b/internal/app/ptah-agent/ptah_client.go @@ -62,6 +62,8 @@ func (a *Agent) sendStartedEvent(ctx context.Context) (*ptahClient.StartedRes, e nodeData.Role = "worker" } + nodeData.Addr = info.Swarm.NodeAddr + startedReq := ptahClient.StartedReq{ NodeData: nodeData, SwarmData: nil, diff --git a/internal/pkg/ptah-client/events.go b/internal/pkg/ptah-client/events.go index aed630c..08f1b87 100644 --- a/internal/pkg/ptah-client/events.go +++ b/internal/pkg/ptah-client/events.go @@ -30,6 +30,7 @@ type NodeData struct { Networks []networks.Network `json:"networks"` } `json:"host"` Role string `json:"role"` + Addr string `json:"addr"` } type StartedReq struct {