pkg.re/essentialkaos/ek.10@v12.41.0+incompatible/system/info_net_darwin.go (about)

     1  package system
     2  
     3  // ////////////////////////////////////////////////////////////////////////////////// //
     4  //                                                                                    //
     5  //                         Copyright (c) 2022 ESSENTIAL KAOS                          //
     6  //      Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>     //
     7  //                                                                                    //
     8  // ////////////////////////////////////////////////////////////////////////////////// //
     9  
    10  import (
    11  	"time"
    12  )
    13  
    14  // ////////////////////////////////////////////////////////////////////////////////// //
    15  
    16  // ❗ GetInterfacesStats returns info about network interfaces
    17  func GetInterfacesStats() (map[string]*InterfaceStats, error) {
    18  	panic("UNSUPPORTED")
    19  	return map[string]*InterfaceStats{"eth0": {}}, nil
    20  }
    21  
    22  // ❗ GetNetworkSpeed returns input/output speed in bytes per second
    23  func GetNetworkSpeed(duration time.Duration) (uint64, uint64, error) {
    24  	panic("UNSUPPORTED")
    25  	return 0, 0, nil
    26  }
    27  
    28  // ❗ CalculateNetworkSpeed calculates network input/output speed in bytes per second for
    29  // all network interfaces
    30  func CalculateNetworkSpeed(ii1, ii2 map[string]*InterfaceStats, duration time.Duration) (uint64, uint64) {
    31  	panic("UNSUPPORTED")
    32  	return 0, 0
    33  }