func hcsStatsToInterfaceStats(stat hcsshim.NetworkStats) (*statsapi.InterfaceStats, error) {
	endpoint, err := hcsshim.GetHNSEndpointByID(stat.EndpointId)
	if err != nil {
		return nil, err
	}

	return &statsapi.InterfaceStats{
		Name:    endpoint.Name,
		RxBytes: &stat.BytesReceived,
		TxBytes: &stat.BytesSent,
	}, nil
}
// hcsStatsToInterfaceStats converts hcsshim.NetworkStats to statsapi.InterfaceStats.
hcsStatsToInterfaceStats converts hcsshim.NetworkStats to statsapi.InterfaceStats.
// hcsStatsToInterfaceStats converts hcsshim . NetworkStats to statsapi . InterfaceStats .
func hcsStatsToInterfaceStats(stat hcsshim.NetworkStats) (*statsapi.InterfaceStats, error) {
	endpoint, err := hcsshim.GetHNSEndpointByID(stat.EndpointId)
	if err != nil {
		return nil, err
	}
	return &statsapi.InterfaceStats{
		Name:    endpoint.Name,
		RxBytes: &stat.BytesReceived,
		TxBytes: &stat.BytesSent,
	}, nil
}
func hcsStatsToInterfaceStats ( stat hcsshim . NetworkStats ) ( * statsapi . InterfaceStats , error ) { endpoint , err := hcsshim . GetHNSEndpointByID ( stat . EndpointId ) if err != nil { return nil , err } return & statsapi . InterfaceStats { Name : endpoint . Name , RxBytes : & stat . BytesReceived , TxBytes : & stat . BytesSent , } , nil }
hcsStatsToInterfaceStats converts hcsshim.NetworkStats to statsapi.InterfaceStats.
hcsStatsToInterfaceStats converts hcsshim . NetworkStats to statsapi . InterfaceStats .