kubernetes: k8s.io/kubernetes/pkg/kubectl/util Index | Files | Directories

package util

import "k8s.io/kubernetes/pkg/kubectl/util"

Index

Package Files

pod_port.go service_port.go umask.go util.go

func HashObject Uses

func HashObject(obj runtime.Object, codec runtime.Codec) (string, error)

HashObject returns the hash of a Object hash by a Codec

func LookupContainerPortNumberByName Uses

func LookupContainerPortNumberByName(pod v1.Pod, name string) (int32, error)

LookupContainerPortNumberByName find containerPort number by its named port name

func LookupContainerPortNumberByServicePort Uses

func LookupContainerPortNumberByServicePort(svc v1.Service, pod v1.Pod, port int32) (int32, error)

LookupContainerPortNumberByServicePort implements the handling of resolving container named port, as well as ignoring targetPort when clusterIP=None It returns an error when a named port can't find a match (with -1 returned), or when the service does not declare such port (with the input port number returned).

func LookupServicePortNumberByName Uses

func LookupServicePortNumberByName(svc v1.Service, name string) (int32, error)

LookupServicePortNumberByName find service port number by its named port name

func ParseFileSource Uses

func ParseFileSource(source string) (keyName, filePath string, err error)

ParseFileSource parses the source given.

Acceptable formats include:
 1.  source-path: the basename will become the key name
 2.  source-name=source-path: the source-name will become the key name and
     source-path is the path to the key file.

Key names cannot include '='.

func ParseLiteralSource Uses

func ParseLiteralSource(source string) (keyName, value string, err error)

ParseLiteralSource parses the source key=val pair into its component pieces. This functionality is distinguished from strings.SplitN(source, "=", 2) since it returns an error in the case of empty keys, values, or a missing equals sign.

func ParseRFC3339 Uses

func ParseRFC3339(s string, nowFn func() metav1.Time) (metav1.Time, error)

ParseRFC3339 parses an RFC3339 date in either RFC3339Nano or RFC3339 format.

func Umask Uses

func Umask(mask int) (old int, err error)

Umask is a wrapper for `unix.Umask()` on non-Windows platforms

Directories

PathSynopsis
event
fieldpath
hash
i18n
rbac
slice
storage

Package util imports 12 packages (graph) and is imported by 38 packages. Updated 2019-07-15. Refresh now. Tools for package owners.