package
0.0.0-20200321091321-bc8cfc345e21
Repository: https://github.com/wuka1/swarmkit.git
Documentation: pkg.go.dev
# Functions
Claim assigns GenericResources to a task by taking them from the node's GenericResource list and storing them in the task's available list.
ClaimResources adds the specified resources to the task's list and removes them from the node's generic resource list.
ConsumeNodeResources removes "res" from nodeAvailableResources.
EnvFormat returns the environment string version of the resource.
GetResource returns resources from the "resources" parameter matching the kind key.
HasEnough returns true if node can satisfy the task's GenericResource request.
HasResource checks if there is enough "res" in the "resources" argument.
Kind returns the kind key as a string.
NewDiscrete creates a Discrete resource.
NewSet creates a set object.
NewString creates a String resource.
Parse parses a table of GenericResource resources.
ParseCmd parses the Generic Resource command line argument and returns a list of *api.GenericResource.
Reclaim adds the resources taken by the task to the node's store.
ValidateTask validates that the task only uses integers for generic resources.
Value returns the value key as a string.