|
2 | 2 |
|
3 | 3 | [![Build Status]](https://travis-ci.org/kubernetes/utils) [](https://godoc.org/k8s.io/utils)
|
4 | 4 |
|
5 |
| -A set of Go libraries that provide low-level, |
6 |
| -kubernetes-independent packages supplementing the [Go |
7 |
| -standard libs]. |
| 5 | +A set of Go libraries that provide low-level, kubernetes-independent packages |
| 6 | +supplementing the [Go standard libs]. |
8 | 7 |
|
9 | 8 | ## Purpose
|
10 | 9 |
|
11 |
| -As Kubernetes grows and spins functionality out of its |
12 |
| -[core] and into cooperating repositories like |
13 |
| -[apiserver], [kubectl], [kubeadm], etc., the need |
14 |
| -arises for leaf repositories to house shared code and |
15 |
| -avoid cycles in repository relationships. |
16 |
| - |
17 |
| -This repository is intended to hold shared utilities |
18 |
| -with no Kubernetes dependence that may be of interest |
19 |
| -to any Go project. See these [instructions for moving] |
20 |
| -an existing package to this repository. |
| 10 | +As Kubernetes grows and spins functionality out of its [core] and into |
| 11 | +cooperating repositories like [apiserver], [kubectl], [kubeadm], etc., the need |
| 12 | +arises for leaf repositories to house shared code and avoid cycles in repository |
| 13 | +relationships. |
21 | 14 |
|
| 15 | +This repository is intended to hold shared utilities with _no Kubernetes |
| 16 | +dependencies_ that may be of interest to any Go project. See these [instructions |
| 17 | +for moving] an existing package to this repository. |
22 | 18 |
|
23 | 19 | ## Criteria for adding code here
|
24 | 20 |
|
25 | 21 | - Used by multiple Kubernetes repositories.
|
26 | 22 |
|
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. |
| 23 | +- Complex enough to be worth vendoring, rather than copying (e.g. not 5 LOC). |
32 | 24 |
|
33 |
| -- Stable, or backward compatible, API. |
| 25 | +- Can be fully exercised by unit tests (e.g. no dependencies on kernels). |
34 | 26 |
|
35 |
| -- _No dependence on any Kubernetes repository_. |
| 27 | +- Has full unit test coverage. |
36 | 28 |
|
37 |
| -## Libraries |
| 29 | +- Stable, or backward compatible, API, with complete godocs. |
38 | 30 |
|
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. |
| 31 | +- Go tools compliant (`go get`, `go test`, etc.). |
50 | 32 |
|
51 |
| -- [Io](/io) provides interfaces for working with file IO. Currently it provides |
52 |
| - functionality for consistently reading a file. |
| 33 | +- Very few (ideally zero) external dependencies. |
53 | 34 |
|
54 |
| -- [NSEnter](/nsenter) provides interfaces for executing and interacting with |
55 |
| - processes running within a namespace. |
| 35 | +- _No dependencies on any other Kubernetes repository_. |
56 | 36 |
|
57 | 37 | [Build Status]: https://travis-ci.org/kubernetes/utils.svg?branch=master
|
58 | 38 | [Go standard libs]: https://golang.org/pkg/#stdlib
|
|
0 commit comments