github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/pkg/compilers/rump/rump-types.go (about)

     1  package rump
     2  
     3  type blk struct {
     4  	Source     string `json:"source"`
     5  	Path       string `json:"path"`
     6  	FSType     string `json:"fstype"`
     7  	MountPoint string `json:"mountpoint,omitempty"`
     8  	DiskFile   string `json:"diskfile,omitempty"`
     9  }
    10  
    11  type Method string
    12  
    13  const (
    14  	Static Method = "static"
    15  	DHCP   Method = "dhcp"
    16  )
    17  
    18  type net struct {
    19  	If     string `json:"if,omitempty"`
    20  	Type   string `json:"type,omitempty"`
    21  	Method Method `json:"method,omitempty"`
    22  	Addr   string `json:"addr,omitempty"`
    23  	Mask   string `json:"mask,omitempty"`
    24  	Cloner string `json:"cloner,omitempty"`
    25  }
    26  
    27  type commandLine struct {
    28  	Bin     string   `json:"bin"`
    29  	Argv    []string `json:"argv"`
    30  	Runmode *string  `json:"runmode,omitempty"`
    31  }
    32  
    33  type rumpConfig struct {
    34  	Rc   []commandLine     `json:"rc"`
    35  	Net  *net              `json:"net,omitempty"`
    36  	Net1 *net              `json:"net1,omitempty"`
    37  	Blk  []blk             `json:"blk,omitempty"`
    38  	Env  map[string]string `json:"env,omitempty"`
    39  }