genericresource

package
v29.9.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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