package
0.21.4
Repository: https://github.com/connorgorman/kubernetes.git
Documentation: pkg.go.dev

# Packages

Package config provides utility objects for decoupling sources of configuration and the actual configuration state.
Package errors implements various utility functions and types around errors.
Package exec provides an injectable interface and implementations for running commands.
No description provided by the author
Package flushwriter implements a wrapper for a writer that flushes on every write if that writer implements the io.Flusher interface.
Package httpstream adds multiplexed streaming support to HTTP requests and responses via connection upgrades.
Package iptables provides an interface and implementations for running iptables commands.
TODO(thockin): This whole pkg is pretty linux-centric.
No description provided by the author
No description provided by the author
Package proxy provides transport and upgrade support for proxies.
Package slice provides utility methods for common operations on slices.
No description provided by the author
Package wait provides tools for polling or listening for changes to a condition.
Package workqueue provides a simple queue that supports the following features: * Fair: items processed in the order in which they are added.
No description provided by the author

# Functions

AddAllFlagsToPFlags adds all of the top level 'flag' package flags to the top level 'pflag' flags.
AddFlagSetToPFlagSet adds all of the flags in a 'flag.FlagSet' package flags to a 'pflag.FlagSet'.
AddPFlagSetToPFlagSet merges the flags of fsFrom into fsTo.
Tests whether all pointer fields in a struct are nil.
Writes 'value' to /proc/<pid>/oom_score_adj.
CertPoolFromFile returns an x509.CertPool containing the certificates in the given PEM-encoded file.
CertsFromPEM returns the x509.Certificates contained in the given PEM-encoded byte array Returns an error if a certificate could not be parsed, or if the data does not contain any certificates.
ChooseHostInterface is a method used fetch an IP for a daemon.It uses data from /proc/net/route file.For a node with no internet connection ,it returns errorFor a multi n/w interface node it returns the IP of the interface with gateway on it.
Takes a list of strings and compiles them into a list of regular expressions.
Date returns the Time corresponding to the supplied parameters by wrapping time.Date.
DeepHashObject writes specified object to hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes.
No description provided by the author
No description provided by the author
No description provided by the author
EscapeQualifiedNameForDisk converts a plugin name, which might contain a / into a string that is safe to use on-disk.
ExecuteTemplate executes templateText with data and output written to w.
No description provided by the author
No description provided by the author
FlushLogs flushes logs immediately.
Forever loops forever running f every period.
No description provided by the author
GenerateSelfSignedCert creates a self-signed certificate and key for the given host.
No description provided by the author
HandleCrash simply catches a crash and logs an error.
HandlerError is a method to invoke when a non-user facing piece of code cannot return an error and needs to indicate it has been ignored.
InitFlags normalizes and parses the command line flags.
InitLogs initializes logs the way we want for kubernetes.
IsCIdentifier tests for a string that conforms the definition of an identifier in C.
IsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123).
IsDNS1123Subdomain tests for a string that conforms to the definition of a subdomain in DNS (RFC 1123).
IsDNS952Label tests for a string that conforms to the definition of a label in DNS (RFC 952).
IsProbableEOF returns true if the given error resembles a connection termination scenario that would justify assuming that the watch is empty.
No description provided by the author
IsValidIPv4 tests that the argument is a valid IPv4 address.
No description provided by the author
IsValidPortName check that the argument is valid syntax.
IsValidPortNum tests that the argument is a valid, non-zero port number.
Joins 'namespace' and 'name' and returns a fully qualified name Assumes that the input is valid.
KeySet creates a StringSet from a keys of a map[string](? extends interface{}).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewIntOrStringFromInt creates an IntOrString object with an int value.
NewIntOrStringFromString creates an IntOrString object with a string value.
NewLogger creates a new log.Logger which sends logs to glog.Info.
NewRunner makes a runner for the given function(s).
No description provided by the author
No description provided by the author
No description provided by the author
NewStringSet creates a StringSet from a list of values.
NewTime returns a wrapped instance of the provided time.
NewTokenBucketRateLimiter creates a rate limiter which implements a token bucket approach.
No description provided by the author
* * The UUID package is naive and can generate identical UUIDs if the time interval is quick enough.
Now returns the current local time.
ObjectDiff writes the two objects out as JSON and prints out the identical part of the objects followed by the remaining part of 'a' and finally the remaining part of 'b'.
ObjectGoPrintDiff is like ObjectDiff, but uses go-spew to print the objects, which shows absolutely everything by recursing into every single pointer (go's %#v formatters OTOH stop at a certain point).
ObjectGoPrintSideBySide prints a and b as textual dumps side by side, enabling easy visual scanning for mismatches.
ParsePortRange parses a string of the form "min-max", inclusive at both ends, and initializs a new PortRange from it.
No description provided by the author
Creates resource-only containerName if it does not already exist and moves the current process to it.
RunSSHCommand returns the stdout, stderr, and exit code from running cmd on host as specific user, along with any SSH-level error.
No description provided by the author
Takes a string of the form "name:port" or "name".
Splits a fully qualified name and returns its namespace and name.
StringDiff diffs a and b and returns a human readable diff.
UnescapeQualifiedNameForDisk converts an escaped plugin name (as per EscapeQualifiedNameForDisk) back to its normal form.
Unix returns the local time corresponding to the given Unix time by wrapping time.Unix.
Until loops until stop channel is closed, running f every period.
Detects if using systemd as the init system Please note that simply reading /proc/1/cmdline can be misleading because some installation of various init programs can automatically make /sbin/init a symlink or even a renamed version of their main program.
WarnWordSepNormalizeFunc changes and warns for flags that contain "_" separators.
WordSepNormalizeFunc changes all flags that contain "_" separators.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The IntOrString holds an int.
The IntOrString holds a string.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

ErrorHandlers is a list of functions which will be invoked when an unreturnable error occurs.
NeverStop may be passed to Until to make it never stop.
PanicHandlers is a list of functions which will be invoked when a panic happens.
For testing, bypass HandleCrash.

# Structs

TODO(ArtfulCoder) sync/atomic/Value was added in golang 1.4 Once support is dropped for go 1.3, this type must be deprecated in favor of sync/atomic/Value.
BoolFlag is a boolean flag compatible with flags and pflags that keeps track of whether it had a value supplied or not.
Empty is public since it is used by some internal API objects for conversions between external string arrays and internal sets, and conversion logic requires public types today.
FakeClock implements Clock, but returns an arbitrary time.
FakeHandler is to assist in testing HTTP requests.
GlogWriter serves as a bridge between the standard log package and the glog package.
IntOrString is a type that can hold an int or a string.
PortRange represents a range of TCP/UDP ports.
RealClock really calls time.Now().
No description provided by the author
Runner is an abstraction to make it easy to start and stop groups of things that can be described by a single function which waits on a channel close to exit.
TODO: Unit tests for this code, we can spin up a test SSH server with instructions here: https://godoc.org/golang.org/x/crypto/ssh#ServerConn.
Should be thread safe.
Not thread safe!.
StringFlag is a string flag compatible with flags and pflags that keeps track of whether it had a value supplied or not.
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON.
No description provided by the author

# Interfaces

Clock allows for injecting fake or real clocks into code that needs to do arbitrary things based on time.
LogInterface is a simple interface to allow injection of Logf to report serving errors.
No description provided by the author
TestInterface is a simple interface providing Errorf, to make injection for testing easier (insert 'yo dawg' meme here).

# Type aliases

No description provided by the author
No description provided by the author
HighWaterMark is a thread-safe object for tracking the maximum value seen for some quantity.
IntstrKind represents the stored type of IntOrString.
IP adapts net.IP for use as a flag.
IPNet adapts net.IPNet for use as a flag.
No description provided by the author
StringSet is a set of strings, implemented via map[string]struct{} for minimal memory consumption.