open-nomad/api/resources.go

28 lines
500 B
Go
Raw Normal View History

2015-09-09 20:02:39 +00:00
package api
// Resources encapsulates the required resources of
// a given task or task group.
type Resources struct {
2015-09-23 18:14:32 +00:00
CPU int
2015-09-09 20:02:39 +00:00
MemoryMB int
DiskMB int
IOPS int
Networks []*NetworkResource
}
2015-11-14 04:51:30 +00:00
type Port struct {
Label string
Value int
}
2015-09-09 20:02:39 +00:00
// NetworkResource is used to describe required network
// resources of a given task.
type NetworkResource struct {
Public bool
CIDR string
2015-11-14 04:51:30 +00:00
ReservedPorts []Port
DynamicPorts []Port
2016-03-11 00:20:51 +00:00
IP string
2015-09-09 20:02:39 +00:00
MBits int
}