github.com/rish1988/moby@v25.0.2+incompatible/api/types/system/info.go (about)

     1  package system
     2  
     3  import (
     4  	"github.com/docker/docker/api/types/container"
     5  	"github.com/docker/docker/api/types/registry"
     6  	"github.com/docker/docker/api/types/swarm"
     7  )
     8  
     9  // Info contains response of Engine API:
    10  // GET "/info"
    11  type Info struct {
    12  	ID                 string
    13  	Containers         int
    14  	ContainersRunning  int
    15  	ContainersPaused   int
    16  	ContainersStopped  int
    17  	Images             int
    18  	Driver             string
    19  	DriverStatus       [][2]string
    20  	SystemStatus       [][2]string `json:",omitempty"` // SystemStatus is only propagated by the Swarm standalone API
    21  	Plugins            PluginsInfo
    22  	MemoryLimit        bool
    23  	SwapLimit          bool
    24  	KernelMemory       bool `json:",omitempty"` // Deprecated: kernel 5.4 deprecated kmem.limit_in_bytes
    25  	KernelMemoryTCP    bool `json:",omitempty"` // KernelMemoryTCP is not supported on cgroups v2.
    26  	CPUCfsPeriod       bool `json:"CpuCfsPeriod"`
    27  	CPUCfsQuota        bool `json:"CpuCfsQuota"`
    28  	CPUShares          bool
    29  	CPUSet             bool
    30  	PidsLimit          bool
    31  	IPv4Forwarding     bool
    32  	BridgeNfIptables   bool
    33  	BridgeNfIP6tables  bool `json:"BridgeNfIp6tables"`
    34  	Debug              bool
    35  	NFd                int
    36  	OomKillDisable     bool
    37  	NGoroutines        int
    38  	SystemTime         string
    39  	LoggingDriver      string
    40  	CgroupDriver       string
    41  	CgroupVersion      string `json:",omitempty"`
    42  	NEventsListener    int
    43  	KernelVersion      string
    44  	OperatingSystem    string
    45  	OSVersion          string
    46  	OSType             string
    47  	Architecture       string
    48  	IndexServerAddress string
    49  	RegistryConfig     *registry.ServiceConfig
    50  	NCPU               int
    51  	MemTotal           int64
    52  	GenericResources   []swarm.GenericResource
    53  	DockerRootDir      string
    54  	HTTPProxy          string `json:"HttpProxy"`
    55  	HTTPSProxy         string `json:"HttpsProxy"`
    56  	NoProxy            string
    57  	Name               string
    58  	Labels             []string
    59  	ExperimentalBuild  bool
    60  	ServerVersion      string
    61  	Runtimes           map[string]RuntimeWithStatus
    62  	DefaultRuntime     string
    63  	Swarm              swarm.Info
    64  	// LiveRestoreEnabled determines whether containers should be kept
    65  	// running when the daemon is shutdown or upon daemon start if
    66  	// running containers are detected
    67  	LiveRestoreEnabled  bool
    68  	Isolation           container.Isolation
    69  	InitBinary          string
    70  	ContainerdCommit    Commit
    71  	RuncCommit          Commit
    72  	InitCommit          Commit
    73  	SecurityOptions     []string
    74  	ProductLicense      string               `json:",omitempty"`
    75  	DefaultAddressPools []NetworkAddressPool `json:",omitempty"`
    76  	CDISpecDirs         []string
    77  
    78  	// Legacy API fields for older API versions.
    79  	legacyFields
    80  
    81  	// Warnings contains a slice of warnings that occurred  while collecting
    82  	// system information. These warnings are intended to be informational
    83  	// messages for the user, and are not intended to be parsed / used for
    84  	// other purposes, as they do not have a fixed format.
    85  	Warnings []string
    86  }
    87  
    88  type legacyFields struct {
    89  	ExecutionDriver string `json:",omitempty"` // Deprecated: deprecated since API v1.25, but returned for older versions.
    90  }
    91  
    92  // PluginsInfo is a temp struct holding Plugins name
    93  // registered with docker daemon. It is used by [Info] struct
    94  type PluginsInfo struct {
    95  	// List of Volume plugins registered
    96  	Volume []string
    97  	// List of Network plugins registered
    98  	Network []string
    99  	// List of Authorization plugins registered
   100  	Authorization []string
   101  	// List of Log plugins registered
   102  	Log []string
   103  }
   104  
   105  // Commit holds the Git-commit (SHA1) that a binary was built from, as reported
   106  // in the version-string of external tools, such as containerd, or runC.
   107  type Commit struct {
   108  	ID       string // ID is the actual commit ID of external tool.
   109  	Expected string // Expected is the commit ID of external tool expected by dockerd as set at build time.
   110  }
   111  
   112  // NetworkAddressPool is a temp struct used by [Info] struct.
   113  type NetworkAddressPool struct {
   114  	Base string
   115  	Size int
   116  }