feat(fleet): add shared WireGuard profiles and bounded rover transport
Add portable shared WireGuard profiles while retaining Tailscale and Worker boundaries. Bound rover command/telemetry delivery, recovery and diagnostic capture across Core and Node.
This commit is contained in:
@@ -13,6 +13,8 @@ import (
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"nodedc.local/mission-core/node-agent/internal/routers"
|
||||
)
|
||||
|
||||
type Invitation struct {
|
||||
@@ -41,10 +43,14 @@ type PairState struct {
|
||||
Revocations []CoreBinding `json:"revocations,omitempty"`
|
||||
}
|
||||
type Pairing struct {
|
||||
Budget *LinkBudget
|
||||
Routers *routers.Collector
|
||||
RoverConfiguration *RoverConfigurationStore
|
||||
Monitor *Monitor
|
||||
Sensors *Sensors
|
||||
DeviceEnrollment *DeviceEnrollment
|
||||
networkCall func(string, string, map[string]any) (map[string]json.RawMessage, error)
|
||||
network *NetworkProfile
|
||||
mu sync.Mutex
|
||||
path string
|
||||
store *Store
|
||||
@@ -148,7 +154,7 @@ func (p *Pairing) status() map[string]any {
|
||||
defer p.mu.Unlock()
|
||||
_ = p.expire()
|
||||
id, _ := p.store.Public()
|
||||
out := map[string]any{"phase": p.state.Phase, "node_id": id, "connection": p.connection, "last_seen": p.lastSeen, "notice": p.listenError, "addresses": p.addresses(), "pending_revocations": len(p.state.Revocations)}
|
||||
out := map[string]any{"network_profile": p.networkViewLocked(), "phase": p.state.Phase, "node_id": id, "connection": p.connection, "last_seen": p.lastSeen, "notice": p.listenError, "addresses": p.addresses(), "pending_revocations": len(p.state.Revocations)}
|
||||
if i := p.state.Invitation; i != nil {
|
||||
out["invitation"] = map[string]any{"id": i.ID, "endpoint": i.Endpoint, "expires_at": i.ExpiresAt}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user