Report VPN fabric session stream usage

This commit is contained in:
2026-05-16 12:16:42 +03:00
parent e50070c005
commit c5e7fe8a31
4 changed files with 97 additions and 4 deletions
@@ -65,6 +65,10 @@ type PacketTransport interface {
ReceiveGatewayPacketBatch(ctx context.Context, timeout time.Duration) ([][]byte, error)
}
type packetTransportSnapshotter interface {
Snapshot() map[string]any
}
type BackendPacketTransport struct {
API *client.Client
ClusterID string
@@ -188,6 +192,11 @@ func (g *Gateway) Snapshot() map[string]any {
if platform := gatewayPlatformSnapshot(g.InterfaceName, g.RouteCIDR); len(platform) > 0 {
out["platform"] = platform
}
if snapshotter, ok := g.Transport.(packetTransportSnapshotter); ok {
if snapshot := snapshotter.Snapshot(); len(snapshot) > 0 {
out["transport_snapshot"] = snapshot
}
}
return out
}