Documentation ¶
Overview ¶
Package util implements various utility functions used in both testing and implementation of OpenShift. Package util may not depend on any other package in the OpenShift package tree.
Index ¶
- Constants
- func AddObjectAnnotations(obj runtime.Object, annotations map[string]string) error
- func AddObjectLabels(obj runtime.Object, labels labels.Set) error
- func MergeInto(dst, src interface{}, flags int) error
- func NoNamespaceKeyFunc(ctx kapi.Context, prefix string, name string) (string, error)
- func UniqueStrings(strings []string) []string
Constants ¶
const ( OverwriteExistingDstKey = 1 << iota ErrorOnExistingDstKey ErrorOnDifferentDstKeyValue )
MergeInto flags
Variables ¶
This section is empty.
Functions ¶
func AddObjectAnnotations ¶ added in v1.0.7
AddObjectAnnotations adds new annotation(s) to a single runtime.Object
func AddObjectLabels ¶ added in v0.4.3
AddObjectLabels adds new label(s) to a single runtime.Object
func MergeInto ¶
MergeInto merges items from a src map into a dst map. Returns an error when the maps are not of the same type. Flags:
- ErrorOnExistingDstKey When set: Return an error if any of the dst keys is already set.
- ErrorOnDifferentDstKeyValue When set: Return an error if any of the dst keys is already set to a different value than src key.
- OverwriteDstKey When set: Overwrite existing dst key value with src key value.
func NoNamespaceKeyFunc ¶ added in v1.0.3
NoNamespaceKeyFunc is the default function for constructing etcd paths to a resource relative to prefix enforcing If a namespace is on context, it errors.
func UniqueStrings ¶ added in v0.2.2
UniqueStrings returns a sorted, uniquified slice of the specified strings
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package docker has utilities to work with Docker.
|
Package docker has utilities to work with Docker. |
dockerfile
Package dockerfile has utilities that complement Docker's official Dockerfile parser.
|
Package dockerfile has utilities that complement Docker's official Dockerfile parser. |
dockerfile/builder
Package builder uses code from github.com/docker/docker/builder/* to implement a Docker builder that does not create individual layers, but instead creates a single layer.
|
Package builder uses code from github.com/docker/docker/builder/* to implement a Docker builder that does not create individual layers, but instead creates a single layer. |
dockerfile/builder/signal
Package signal provides helper functions for dealing with signals across various operating systems.
|
Package signal provides helper functions for dealing with signals across various operating systems. |
Package errors provides utility functions for various errors
|
Package errors provides utility functions for various errors |
Package file implements utility functions used to work with arbitrary files.
|
Package file implements utility functions used to work with arbitrary files. |
Package fsnotification provides helper functions that wrap the fsnotify filesystem notification package.
|
Package fsnotification provides helper functions that wrap the fsnotify filesystem notification package. |
http
|
|
Package httpproxy contains an upgrade-aware HTTP single-host reverse proxy.
|
Package httpproxy contains an upgrade-aware HTTP single-host reverse proxy. |
labelselector is trim down version of k8s/pkg/labels/selector.go It only accepts exact label matches Example: "k1=v1, k2 = v2"
|
labelselector is trim down version of k8s/pkg/labels/selector.go It only accepts exact label matches Example: "k1=v1, k2 = v2" |
Package namer contains a name generator for unique names
|
Package namer contains a name generator for unique names |