summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/utils/README.md
blob: 2504649ef58e2785f7f47a83dd94ae8b6090596f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Utils

[![Build Status]](https://travis-ci.org/kubernetes/utils)

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](/exec) provides an interface for `os/exec`. It makes it easier
  to mock and replace in tests, especially with
  the [FakeExec](exec/testing/fake_exec.go) struct.

[Build Status]: https://travis-ci.org/kubernetes/utils.svg?branch=master
[Go standard libs]: https://golang.org/pkg/#stdlib
[api]: https://github.com/kubernetes/api
[apiserver]: https://github.com/kubernetes/apiserver
[core]: https://github.com/kubernetes/kubernetes
[ingress]: https://github.com/kubernetes/ingress
[kubeadm]: https://github.com/kubernetes/kubeadm
[kubectl]: https://github.com/kubernetes/kubectl
[instructions for moving]: ./HOWTOMOVE.md