mirror of
https://github.com/apple/container.git
synced 2026-09-23 16:15:37 +00:00
Netlink: Add stats support (#308)
Adds support for grabbing stats for an iface. This will be surfaced in a coming change to get container level statistics from the guest, where one field will be network stats.
This commit is contained in:
@@ -68,6 +68,7 @@ public protocol VirtualMachineAgent: Sendable {
|
||||
func routeAddDefault(name: String, gateway: String) async throws
|
||||
func configureDNS(config: DNS, location: String) async throws
|
||||
func configureHosts(config: Hosts, location: String) async throws
|
||||
func interfaceStatistics(name: String) async throws -> InterfaceStatistics
|
||||
}
|
||||
|
||||
extension VirtualMachineAgent {
|
||||
@@ -82,4 +83,8 @@ extension VirtualMachineAgent {
|
||||
public func writeFile(path: String, data: Data, flags: WriteFileFlags, mode: UInt32) async throws {
|
||||
throw ContainerizationError(.unsupported, message: "writeFile")
|
||||
}
|
||||
|
||||
public func interfaceStatistics(name: String) async throws -> InterfaceStatistics {
|
||||
throw ContainerizationError(.unsupported, message: "interfaceStatistics")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user