Documentation ¶
Index ¶
- type Resources
- func (res *Resources) Add(new *Resources) *Resources
- func (res *Resources) DiffersFrom(quota *v1.ResourceQuota) bool
- func (res *Resources) ForceNoScaleDownWhenScaleUp(quota *v1.ResourceQuota)
- func (res *Resources) IsEmpty() bool
- func (res *Resources) IsScaleDown(quota *v1.ResourceQuota) bool
- func (res *Resources) Limit(limit *Resources) *Resources
- func (res *Resources) Max(new *Resources) *Resources
- func (res *Resources) Replace(new *Resources) *Resources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resources ¶
type Resources struct { Cpu int64 // In millicores Memory int64 // In megabytes Storage int64 // Store is included here for logging purposes, but not intended to be scaled (yet) }
Resources combines Cpu and Memory into a single container
func (*Resources) Add ¶
Add adds the new resources to the existing resources. Result is updated and also returned.
func (*Resources) DiffersFrom ¶
func (res *Resources) DiffersFrom(quota *v1.ResourceQuota) bool
func (*Resources) ForceNoScaleDownWhenScaleUp ¶
func (res *Resources) ForceNoScaleDownWhenScaleUp(quota *v1.ResourceQuota)
func (*Resources) IsScaleDown ¶
func (res *Resources) IsScaleDown(quota *v1.ResourceQuota) bool
func (*Resources) Limit ¶
Limit limits the resources with a maximum of the specified limit. Result is updated and also returned.
Click to show internal directories.
Click to hide internal directories.