Make NetworkInterface public

In other case it is impossible to implement Stats() method from
interface outside libcontainer.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov 2015-03-03 11:04:42 -08:00
parent 56bc1485df
commit 2cd0ee8cf2
2 changed files with 4 additions and 4 deletions

View File

@ -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 == "" {

View File

@ -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