github.com/bigcommerce/nomad@v0.9.3-bc/drivers/rkt/api.go (about)

     1  package rkt
     2  
     3  import (
     4  	"net"
     5  )
     6  
     7  // This file contains the structrs used by this driver.
     8  // Embedding structs here helps avoid depending on a linux only library
     9  
    10  // Pod is the pod object, as defined in
    11  // https://github.com/rkt/rkt/blob/03285a7db960311faf887452538b2b8ae4304488/api/v1/json.go#L68-L88
    12  type Pod struct {
    13  	UUID     string    `json:"name"`
    14  	State    string    `json:"state"`
    15  	Networks []NetInfo `json:"networks,omitempty"`
    16  }
    17  
    18  // A type and some structure to represent rkt's view of a *runtime*
    19  // network instance.
    20  // https://github.com/rkt/rkt/blob/4080b1743e0c46fa1645f4de64f1b75a980d82a3/networking/netinfo/netinfo.go#L29-L48
    21  type NetInfo struct {
    22  	NetName    string `json:"netName"`
    23  	ConfPath   string `json:"netConf"`
    24  	PluginPath string `json:"pluginPath"`
    25  	IfName     string `json:"ifName"`
    26  	IP         net.IP `json:"ip"`
    27  	Args       string `json:"args"`
    28  }