github.com/rootless-containers/rootlesskit/v2@v2.3.4/pkg/api/api.go (about)

     1  package api
     2  
     3  import "net"
     4  
     5  const (
     6  	// Version of the REST API, not implementation version.
     7  	// See openapi.yaml for the definition.
     8  	Version = "1.1.1"
     9  )
    10  
    11  // Info is the structure returned by `GET /info`
    12  type Info struct {
    13  	APIVersion    string             `json:"apiVersion"` // REST API version
    14  	Version       string             `json:"version"`    // Implementation version
    15  	StateDir      string             `json:"stateDir"`
    16  	ChildPID      int                `json:"childPID"`
    17  	NetworkDriver *NetworkDriverInfo `json:"networkDriver,omitempty"`
    18  	PortDriver    *PortDriverInfo    `json:"portDriver,omitempty"`
    19  }
    20  
    21  // NetworkDriverInfo in Info
    22  type NetworkDriverInfo struct {
    23  	Driver         string   `json:"driver"`
    24  	DNS            []net.IP `json:"dns,omitempty"`
    25  	ChildIP        net.IP   `json:"childIP,omitempty"`        // since API v1.1.1 (RootlessKit v0.14.1)
    26  	DynamicChildIP bool     `json:"dynamicChildIP,omitempty"` // since API v1.1.1
    27  }
    28  
    29  // PortDriverInfo in Info
    30  type PortDriverInfo struct {
    31  	Driver                  string   `json:"driver"`
    32  	Protos                  []string `json:"protos"`
    33  	DisallowLoopbackChildIP bool     `json:"disallowLoopbackChildIP,omitempty"` // since API v1.1.1
    34  }