github.com/ryanslade/nomad@v0.2.4-0.20160128061903-fc95782f2089/api/resources.go (about)

     1  package api
     2  
     3  // Resources encapsulates the required resources of
     4  // a given task or task group.
     5  type Resources struct {
     6  	CPU      int
     7  	MemoryMB int
     8  	DiskMB   int
     9  	IOPS     int
    10  	Networks []*NetworkResource
    11  }
    12  
    13  type Port struct {
    14  	Label string
    15  	Value int
    16  }
    17  
    18  // NetworkResource is used to describe required network
    19  // resources of a given task.
    20  type NetworkResource struct {
    21  	Public        bool
    22  	CIDR          string
    23  	ReservedPorts []Port
    24  	DynamicPorts  []Port
    25  	MBits         int
    26  }