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

package util

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

Package util holds utility functions.


Package Files

boottime_util_linux.go doc.go util.go util_unix.go

func CreateListener Uses

func CreateListener(endpoint string) (net.Listener, error)

CreateListener creates a listener on the specified endpoint.

func FromApiserverCache Uses

func FromApiserverCache(opts *metav1.GetOptions)

FromApiserverCache modifies <opts> so that the GET request will be served from apiserver cache instead of from etcd.

func GetAddressAndDialer Uses

func GetAddressAndDialer(endpoint string) (string, func(ctx context.Context, addr string) (net.Conn, error), error)

GetAddressAndDialer returns the address parsed from the given endpoint and a context dialer.

func GetBootTime Uses

func GetBootTime() (time.Time, error)

GetBootTime returns the time at which the machine was started, truncated to the nearest second

func GetNodenameForKernel Uses

func GetNodenameForKernel(hostname string, hostDomainName string, setHostnameAsFQDN *bool) (string, error)

GetNodenameForKernel gets hostname value to set in the hostname field (the nodename field of struct utsname) of the pod.

func IsUnixDomainSocket Uses

func IsUnixDomainSocket(filePath string) (bool, error)

IsUnixDomainSocket returns whether a given file is a AF_UNIX socket file

func LocalEndpoint Uses

func LocalEndpoint(path, file string) (string, error)

LocalEndpoint returns the full path to a unix socket at the given endpoint

func NormalizePath Uses

func NormalizePath(path string) string

NormalizePath is a no-op for Linux for now


storePackage store hosts a Store interface and its implementations.

Package util imports 11 packages (graph) and is imported by 157 packages. Updated 2020-09-23. Refresh now. Tools for package owners.