Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostResources ¶
HostResources is a non-thread safe helper struct holding the Slack and NonSlack resources for a host.
func (HostResources) Add ¶
func (r HostResources) Add(other HostResources) HostResources
Add adds other resources onto current one.
func (HostResources) Contains ¶
func (r HostResources) Contains(other HostResources) bool
Contains determines whether current Resources is large enough to contain the other one.
func (HostResources) Subtract ¶
func (r HostResources) Subtract(other HostResources) HostResources
Subtract the other host resource from current one.
func (HostResources) TrySubtract ¶
func (r HostResources) TrySubtract(other HostResources) (HostResources, bool)
TrySubtract attempts to subtract a host resource from current one but returns false if other has more resources.
Click to show internal directories.
Click to hide internal directories.