genericresource

package
v29.0.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package genericresource is a local fork of SwarmKit's genericresource package, without protobuf dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResource

func GetResource(kind string, resources []api.GenericResource) []api.GenericResource

GetResource returns resources from the "resources" parameter matching the kind key

func HasResource

func HasResource(res api.GenericResource, resources []api.GenericResource) bool

HasResource checks if there is enough "res" in the "resources" argument

func NewDiscrete

func NewDiscrete(key string, val int64) api.GenericResource

NewDiscrete creates a Discrete resource

func NewSet

func NewSet(key string, vals ...string) []api.GenericResource

NewSet creates a set object

func NewString

func NewString(kind, value string) api.GenericResource

NewString creates a String resource

func Parse

func Parse(cmds []string) ([]api.GenericResource, error)

Parse parses a table of GenericResource resources

func ParseCmd

func ParseCmd(cmd string) ([]api.GenericResource, error)

ParseCmd parses the Generic Resource command line argument and returns a list of api.GenericResource

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL