From 2cd0ee8cf21eecaa9d39d699692284be44cf6ca2 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Tue, 3 Mar 2015 11:04:42 -0800 Subject: [PATCH] Make NetworkInterface public In other case it is impossible to implement Stats() method from interface outside libcontainer. Signed-off-by: Alexander Morozov --- network_linux.go | 4 ++-- stats.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/network_linux.go b/network_linux.go index 0325e97b7..687c5e8fa 100644 --- a/network_linux.go +++ b/network_linux.go @@ -37,8 +37,8 @@ func getStrategy(tpe string) (networkStrategy, error) { } // Returns the network statistics for the network interfaces represented by the NetworkRuntimeInfo. -func getNetworkInterfaceStats(interfaceName string) (*networkInterface, error) { - out := &networkInterface{Name: interfaceName} +func getNetworkInterfaceStats(interfaceName string) (*NetworkInterface, error) { + out := &NetworkInterface{Name: interfaceName} // This can happen if the network runtime information is missing - possible if the // container was created by an old version of libcontainer. if interfaceName == "" { diff --git a/stats.go b/stats.go index 926d4d6bd..ba72a6fde 100644 --- a/stats.go +++ b/stats.go @@ -3,11 +3,11 @@ package libcontainer import "github.com/docker/libcontainer/cgroups" type Stats struct { - Interfaces []*networkInterface + Interfaces []*NetworkInterface CgroupStats *cgroups.Stats } -type networkInterface struct { +type NetworkInterface struct { // Name is the name of the network interface. Name string