Report VPN fabric session stream usage
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user