Remove more code
Based on a patch by Grant Seltzer <grantseltzer@gmail.com> Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
parent
076755f4a2
commit
f191bf69ff
8 changed files with 0 additions and 118 deletions
11
README.md
11
README.md
|
@ -1,11 +0,0 @@
|
|||
pkg/ is a collection of utility packages used by the Docker project without being specific to its internals.
|
||||
|
||||
Utility packages are kept separate from the docker core codebase to keep it as small and concise as possible.
|
||||
If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the
|
||||
Docker organization, to facilitate re-use by other projects. However that is not the priority.
|
||||
|
||||
The directory `pkg` is named after the same directory in the camlistore project. Since Brad is a core
|
||||
Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!
|
||||
|
||||
Because utility packages are small and neatly separated from the rest of the codebase, they are a good
|
||||
place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!
|
|
@ -1 +0,0 @@
|
|||
This code provides helper functions for dealing with archive files.
|
|
@ -1,40 +0,0 @@
|
|||
Package mflag (aka multiple-flag) implements command-line flag parsing.
|
||||
It's a **hacky** fork of the [official golang package](http://golang.org/pkg/flag/)
|
||||
|
||||
It adds:
|
||||
|
||||
* both short and long flag version
|
||||
`./example -s red` `./example --string blue`
|
||||
|
||||
* multiple names for the same option
|
||||
```
|
||||
$>./example -h
|
||||
Usage of example:
|
||||
-s, --string="": a simple string
|
||||
```
|
||||
|
||||
___
|
||||
It is very flexible on purpose, so you can do things like:
|
||||
```
|
||||
$>./example -h
|
||||
Usage of example:
|
||||
-s, -string, --string="": a simple string
|
||||
```
|
||||
|
||||
Or:
|
||||
```
|
||||
$>./example -h
|
||||
Usage of example:
|
||||
-oldflag, --newflag="": a simple string
|
||||
```
|
||||
|
||||
You can also hide some flags from the usage, so if we want only `--newflag`:
|
||||
```
|
||||
$>./example -h
|
||||
Usage of example:
|
||||
--newflag="": a simple string
|
||||
$>./example -oldflag str
|
||||
str
|
||||
```
|
||||
|
||||
See [example.go](example/example.go) for more details.
|
|
@ -1,58 +0,0 @@
|
|||
Plugin RPC Generator
|
||||
====================
|
||||
|
||||
Generates go code from a Go interface definition for proxying between the plugin
|
||||
API and the subsystem being extended.
|
||||
|
||||
## Usage
|
||||
|
||||
Given an interface definition:
|
||||
|
||||
```go
|
||||
type volumeDriver interface {
|
||||
Create(name string, opts opts) (err error)
|
||||
Remove(name string) (err error)
|
||||
Path(name string) (mountpoint string, err error)
|
||||
Mount(name string) (mountpoint string, err error)
|
||||
Unmount(name string) (err error)
|
||||
}
|
||||
```
|
||||
|
||||
**Note**: All function options and return values must be named in the definition.
|
||||
|
||||
Run the generator:
|
||||
|
||||
```bash
|
||||
$ pluginrpc-gen --type volumeDriver --name VolumeDriver -i volumes/drivers/extpoint.go -o volumes/drivers/proxy.go
|
||||
```
|
||||
|
||||
Where:
|
||||
- `--type` is the name of the interface to use
|
||||
- `--name` is the subsystem that the plugin "Implements"
|
||||
- `-i` is the input file containing the interface definition
|
||||
- `-o` is the output file where the the generated code should go
|
||||
|
||||
**Note**: The generated code will use the same package name as the one defined in the input file
|
||||
|
||||
Optionally, you can skip functions on the interface that should not be
|
||||
implemented in the generated proxy code by passing in the function name to `--skip`.
|
||||
This flag can be specified multiple times.
|
||||
|
||||
You can also add build tags that should be prepended to the generated code by
|
||||
supplying `--tag`. This flag can be specified multiple times.
|
||||
|
||||
## Known issues
|
||||
|
||||
## go-generate
|
||||
|
||||
You can also use this with go-generate, which is pretty awesome.
|
||||
To do so, place the code at the top of the file which contains the interface
|
||||
definition (i.e., the input file):
|
||||
|
||||
```go
|
||||
//go:generate pluginrpc-gen -i $GOFILE -o proxy.go -type volumeDriver -name VolumeDriver
|
||||
```
|
||||
|
||||
Then cd to the package dir and run `go generate`
|
||||
|
||||
**Note**: the `pluginrpc-gen` binary must be within your `$PATH`
|
|
@ -1,5 +0,0 @@
|
|||
## reexec
|
||||
|
||||
The `reexec` package facilitates the busybox style reexec of the docker binary that we require because
|
||||
of the forking limitations of using Go. Handlers can be registered with a name and the argv 0 of
|
||||
the exec of the binary will be used to find and execute custom init paths.
|
|
@ -1 +0,0 @@
|
|||
This package provides helper functions for dealing with string identifiers
|
|
@ -1 +0,0 @@
|
|||
This package provides helper functions for dealing with strings
|
|
@ -1 +0,0 @@
|
|||
SysInfo stores information about which features a kernel supports.
|
Loading…
Reference in a new issue