labels

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2017 License: Apache-2.0 Imports: 2 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 labels provides utilities to work with Kubernetes labels.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLabel

func AddLabel(labels map[string]string, labelKey string, labelValue string) map[string]string

AddLabel returns a map with the given key and value added to the given map.

func AddLabelToSelector

func AddLabelToSelector(selector *unversioned.LabelSelector, labelKey string, labelValue string) *unversioned.LabelSelector

AddLabelToSelector returns a selector with the given key and value added to the given selector's MatchLabels.

func CloneAndAddLabel

func CloneAndAddLabel(labels map[string]string, labelKey string, labelValue uint32) map[string]string

Clones the given map and returns a new map with the given key and value added. Returns the given map, if labelKey is empty.

func CloneAndRemoveLabel

func CloneAndRemoveLabel(labels map[string]string, labelKey string) map[string]string

CloneAndRemoveLabel clones the given map and returns a new map with the given key removed. Returns the given map, if labelKey is empty.

func CloneSelectorAndAddLabel

func CloneSelectorAndAddLabel(selector *unversioned.LabelSelector, labelKey string, labelValue uint32) *unversioned.LabelSelector

Clones the given selector and returns a new selector with the given key and value added. Returns the given selector, if labelKey is empty.

func SelectorHasLabel

func SelectorHasLabel(selector *unversioned.LabelSelector, labelKey string) bool

SelectorHasLabel checks if the given selector contains the given label key in its MatchLabels

Types

This section is empty.

Jump to

Keyboard shortcuts

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