k3s/vendor/k8s.io/utils
Darren Shepherd 2193fe10cd Update vendor 2019-04-08 22:50:54 -07:00
..
buffer Update vendor 2019-04-08 22:50:54 -07:00
clock Update vendor 2019-04-08 22:50:54 -07:00
exec Update vendor 2019-04-08 22:50:54 -07:00
integer Update vendor 2019-04-08 22:50:54 -07:00
io Update vendor 2019-04-08 22:50:54 -07:00
keymutex Update vendor 2019-04-08 22:50:54 -07:00
net Update vendor 2019-04-08 22:50:54 -07:00
nsenter Update vendor 2019-04-08 22:50:54 -07:00
path Update vendor 2019-04-08 22:50:54 -07:00
pointer Update vendor 2019-04-08 22:50:54 -07:00
strings Update vendor 2019-04-08 22:50:54 -07:00
trace Update vendor 2019-04-08 22:50:54 -07:00
.travis.yml Update vendor 2019-04-08 22:50:54 -07:00
CONTRIBUTING.md Update vendor 2019-01-11 21:58:27 -07:00
HOWTOMOVE.md Update vendor 2019-01-11 21:58:27 -07:00
LICENSE Update vendor 2019-01-11 21:58:27 -07:00
Makefile Update vendor 2019-04-08 22:50:54 -07:00
OWNERS Update vendor 2019-04-08 22:50:54 -07:00
README.md Update vendor 2019-04-08 22:50:54 -07:00
SECURITY_CONTACTS Update vendor 2019-04-08 22:50:54 -07:00
code-of-conduct.md Update vendor 2019-01-11 21:58:27 -07:00

README.md

Utils

Build Status GoDoc

A set of Go libraries that provide low-level, kubernetes-independent packages supplementing the Go standard libs.

Purpose

As Kubernetes grows and spins functionality out of its core and into cooperating repositories like apiserver, kubectl, kubeadm, etc., the need arises for leaf repositories to house shared code and avoid cycles in repository relationships.

This repository is intended to hold shared utilities with no Kubernetes dependence that may be of interest to any Go project. See these instructions for moving an existing package to this repository.

Criteria for adding code here

  • Used by multiple Kubernetes repositories.

  • Full unit test coverage.

  • Go tools compliant (go get, go test, etc.).

  • Complex enough to be worth vendoring, rather than copying.

  • Stable, or backward compatible, API.

  • No dependence on any Kubernetes repository.

Libraries

  • Exec provides an interface for os/exec. It makes it easier to mock and replace in tests, especially with the FakeExec struct.

  • Temp provides an interface to create temporary directories. It also provides a FakeDir implementation to replace in tests.

  • Clock provides an interface for time-based operations. It allows mocking time for testing.

  • Pointers provides some functions for pointer-based operations.

  • Io provides interfaces for working with file IO. Currently it provides functionality for consistently reading a file.

  • NSEnter provies interfaces for executing and interacting with processes running within a namespace.

Contributing

Please see CONTRIBUTING.md for instructions on how to contribute.