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

     1  // Package system provides methods for working with system data (metrics/users)
     2  package system
     3  
     4  // ////////////////////////////////////////////////////////////////////////////////// //
     5  //                                                                                    //
     6  //                         Copyright (c) 2022 ESSENTIAL KAOS                          //
     7  //      Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>     //
     8  //                                                                                    //
     9  // ////////////////////////////////////////////////////////////////////////////////// //
    10  
    11  import (
    12  	"time"
    13  )
    14  
    15  // ////////////////////////////////////////////////////////////////////////////////// //
    16  
    17  // ❗ GetUptime returns uptime in seconds from 1/1/1970
    18  func GetUptime() (uint64, error) {
    19  	panic("UNSUPPORTED")
    20  	return 0, nil
    21  }
    22  
    23  // ❗ GetLA returns loadavg
    24  func GetLA() (*LoadAvg, error) {
    25  	panic("UNSUPPORTED")
    26  	return nil, nil
    27  }
    28  
    29  // ❗ GetMemUsage returns memory usage info
    30  func GetMemUsage() (*MemUsage, error) {
    31  	panic("UNSUPPORTED")
    32  	return nil, nil
    33  }
    34  
    35  // ❗ GetCPUUsage returns info about CPU usage
    36  func GetCPUUsage(duration time.Duration) (*CPUUsage, error) {
    37  	panic("UNSUPPORTED")
    38  	return nil, nil
    39  }
    40  
    41  // ❗ CalculateCPUUsage calcualtes CPU usage based on CPUStats
    42  func CalculateCPUUsage(c1, c2 *CPUStats) *CPUUsage {
    43  	panic("UNSUPPORTED")
    44  	return nil
    45  }
    46  
    47  // ❗ GetCPUStats returns basic CPU stats
    48  func GetCPUStats() (*CPUStats, error) {
    49  	panic("UNSUPPORTED")
    50  	return nil, nil
    51  }
    52  
    53  // ❗ GetCPUInfo returns slice with info about CPUs
    54  func GetCPUInfo() ([]*CPUInfo, error) {
    55  	panic("UNSUPPORTED")
    56  	return nil, nil
    57  }
    58  
    59  // ❗ GetFSUsage returns info about mounted filesystems
    60  func GetFSUsage() (map[string]*FSUsage, error) {
    61  	panic("UNSUPPORTED")
    62  	return map[string]*FSUsage{"/": {}}, nil
    63  }
    64  
    65  // ❗ GetIOStats returns I/O stats
    66  func GetIOStats() (map[string]*IOStats, error) {
    67  	panic("UNSUPPORTED")
    68  	return map[string]*IOStats{"/dev/sda1": {}}, nil
    69  }
    70  
    71  // ❗ GetSystemInfo returns system info
    72  func GetSystemInfo() (*SystemInfo, error) {
    73  	panic("UNSUPPORTED")
    74  	return nil, nil
    75  }
    76  
    77  // ❗ GetInterfacesStats returns info about network interfaces
    78  func GetInterfacesStats() (map[string]*InterfaceStats, error) {
    79  	panic("UNSUPPORTED")
    80  	return map[string]*InterfaceStats{"eth0": {}}, nil
    81  }
    82  
    83  // ❗ GetNetworkSpeed returns input/output speed in bytes per second
    84  func GetNetworkSpeed(duration time.Duration) (uint64, uint64, error) {
    85  	panic("UNSUPPORTED")
    86  	return 0, 0, nil
    87  }
    88  
    89  // ❗ CalculateNetworkSpeed calculates network input/output speed in bytes per second for
    90  // all network interfaces
    91  func CalculateNetworkSpeed(ii1, ii2 map[string]*InterfaceStats, duration time.Duration) (uint64, uint64) {
    92  	panic("UNSUPPORTED")
    93  	return 0, 0
    94  }
    95  
    96  // ❗ GetIOUtil returns IO utilization
    97  func GetIOUtil(duration time.Duration) (map[string]float64, error) {
    98  	panic("UNSUPPORTED")
    99  	return map[string]float64{"/": 0}, nil
   100  }
   101  
   102  // ❗ CalculateIOUtil calculates IO utilization for all devices
   103  func CalculateIOUtil(io1, io2 map[string]*IOStats, duration time.Duration) map[string]float64 {
   104  	panic("UNSUPPORTED")
   105  	return map[string]float64{"/": 0}
   106  }