• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

buffer/H24-Mar-2020-

clock/H24-Mar-2020-

diff/H24-Mar-2020-

exec/H24-Mar-2020-

field/H24-Mar-2020-

hack/H24-Mar-2020-

inotify/H24-Mar-2020-

integer/H24-Mar-2020-

io/H24-Mar-2020-

keymutex/H24-Mar-2020-

mount/H24-Mar-2020-

net/H24-Mar-2020-

nsenter/H24-Mar-2020-

path/H24-Mar-2020-

pointer/H24-Mar-2020-

semantic/H24-Mar-2020-

strings/H24-Mar-2020-

temp/H24-Mar-2020-

third_party/forked/golang/H24-Mar-2020-

trace/H24-Mar-2020-

.travis.ymlH A D24-Mar-2020105

CONTRIBUTING.mdH A D24-Mar-2020496

HOWTOMOVE.mdH A D24-Mar-20201.5 KiB

LICENSEH A D24-Mar-202011.1 KiB

MakefileH A D24-Mar-2020926

OWNERSH A D24-Mar-2020247

README.mdH A D24-Mar-20202.3 KiB

SECURITY_CONTACTSH A D24-Mar-2020526

code-of-conduct.mdH A D24-Mar-2020148

go.modH A D24-Mar-2020164

go.sumH A D24-Mar-20201.1 KiB

README.md

1# Utils
2
3[![Build Status]](https://travis-ci.org/kubernetes/utils) [![GoDoc](https://godoc.org/k8s.io/utils?status.svg)](https://godoc.org/k8s.io/utils)
4
5A set of Go libraries that provide low-level,
6kubernetes-independent packages supplementing the [Go
7standard libs].
8
9## Purpose
10
11As Kubernetes grows and spins functionality out of its
12[core] and into cooperating repositories like
13[apiserver], [kubectl], [kubeadm], etc., the need
14arises for leaf repositories to house shared code and
15avoid cycles in repository relationships.
16
17This repository is intended to hold shared utilities
18with no Kubernetes dependence that may be of interest
19to any Go project.  See these [instructions for moving]
20an existing package to this repository.
21
22
23## Criteria for adding code here
24
25- Used by multiple Kubernetes repositories.
26
27- Full unit test coverage.
28
29- Go tools compliant (`go get`, `go test`, etc.).
30
31- Complex enough to be worth vendoring, rather than copying.
32
33- Stable, or backward compatible, API.
34
35- _No dependence on any Kubernetes repository_.
36
37## Libraries
38
39- [Exec](/exec) provides an interface for `os/exec`. It makes it easier
40  to mock and replace in tests, especially with
41  the [FakeExec](exec/testing/fake_exec.go) struct.
42
43- [Temp](/temp) provides an interface to create temporary directories. It also
44  provides a [FakeDir](temp/temptest) implementation to replace in tests.
45
46- [Clock](/clock) provides an interface for time-based operations.  It allows
47  mocking time for testing.
48
49- [Pointer](/pointer) provides some functions for pointer-based operations.
50
51- [Io](/io) provides interfaces for working with file IO. Currently it provides
52  functionality for consistently reading a file.
53
54- [NSEnter](/nsenter) provides interfaces for executing and interacting with
55  processes running within a namespace.
56
57[Build Status]: https://travis-ci.org/kubernetes/utils.svg?branch=master
58[Go standard libs]: https://golang.org/pkg/#stdlib
59[api]: https://github.com/kubernetes/api
60[apiserver]: https://github.com/kubernetes/apiserver
61[core]: https://github.com/kubernetes/kubernetes
62[ingress]: https://github.com/kubernetes/ingress
63[kubeadm]: https://github.com/kubernetes/kubeadm
64[kubectl]: https://github.com/kubernetes/kubectl
65[instructions for moving]: ./HOWTOMOVE.md
66
67## Contributing
68
69Please see [CONTRIBUTING.md](CONTRIBUTING.md) for instructions on how to contribute.
70