moby--moby/api/types
Brian Goff 054abff3b6 Implement optional ring buffer for container logs
This allows the user to set a logging mode to "blocking" (default), or
"non-blocking", which uses the ring buffer as a proxy to the real log
driver.

This allows a container to never be blocked on stdio at the cost of
dropping log messages.

Introduces 2 new log-opts that works for all drivers, `log-mode` and
`log-size`. `log-mode` takes a  value of "blocking", or "non-blocking"
I chose not to implement this as a bool since it is difficult to
determine if the mode was set to false vs just not set... especially
difficult when merging the default daemon config with the container config.
`log-size` takes a size string, e.g. `2MB`, which sets the max size
of the ring buffer. When the max size is reached, it will start
dropping log messages.

```
BenchmarkRingLoggerThroughputNoReceiver-8           	2000000000	        36.2 ns/op	 856.35 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputWithReceiverDelay0-8   	300000000	       156 ns/op	 198.48 MB/s	      32 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay1-8        	2000000000	        36.1 ns/op	 857.80 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay10-8       	1000000000	        36.2 ns/op	 856.53 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay50-8       	2000000000	        34.7 ns/op	 894.65 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay100-8      	2000000000	        35.1 ns/op	 883.91 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay300-8      	1000000000	        35.9 ns/op	 863.90 MB/s	       0 B/op	       0 allocs/op
BenchmarkRingLoggerThroughputConsumeDelay500-8      	2000000000	        35.8 ns/op	 866.88 MB/s	       0 B/op	       0 allocs/op
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-02-01 13:52:37 -05:00
..
backend record pid of exec'd process 2016-10-20 17:06:11 +02:00
blkiodev Add engine-api types to docker 2016-09-07 11:05:58 -07:00
container Implement optional ring buffer for container logs 2017-02-01 13:52:37 -05:00
events Add engine-api types to docker 2016-09-07 11:05:58 -07:00
filters Refactoring ineffectual assignments 2017-01-13 00:27:01 -07:00
image Set expected response headers for Ping. 2017-01-03 11:47:47 -05:00
mount fix typo in mount.go 2017-01-13 22:36:32 +08:00
network change minor mistake of spelling 2016-12-20 21:05:19 +08:00
reference *: use opencontainers/go-digest package 2017-01-06 18:48:41 -08:00
registry hack/swagger-gen.sh is not exist, it should be /hack/generate-swagger-api.sh 2016-11-22 16:32:32 +08:00
strslice Add engine-api types to docker 2016-09-07 11:05:58 -07:00
swarm Add `--read-only` for `service create` and `service update` 2017-01-30 12:47:26 -08:00
time fix typo in api/types/time/timestamp.go 2017-01-14 14:16:03 +08:00
versions Merge pull request #28651 from YuPengZTE/devMD002 2016-11-22 13:11:37 +01:00
volume hack/swagger-gen.sh is not exist, it should be /hack/generate-swagger-api.sh 2016-11-22 16:32:32 +08:00
auth.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
client.go fix typo in api/types/client.go 2017-01-14 15:10:08 +08:00
configs.go Enforce zero plugin refcount during disable. 2016-12-22 13:26:53 -08:00
error_response.go Update to inline comments. 2016-10-31 11:13:41 -04:00
graph_driver_data.go Generate GraphDriver from spec, and fix up image spec. 2017-01-03 11:47:47 -05:00
id_response.go Add an IDResponse type 2016-10-31 11:16:02 -04:00
image_delete_response_item.go Generate ImageDeleteResponse from swagger spec. 2017-01-03 11:47:47 -05:00
image_summary.go Generate api/types:Image from the swagger spec 2016-10-20 13:24:23 -07:00
plugin.go plugins: rename DeviceCreation to AllowAllDevices 2017-01-10 13:50:30 -08:00
plugin_device.go Generate plugin types from the swagger spec. 2016-10-20 13:24:23 -07:00
plugin_env.go Generate plugin types from the swagger spec. 2016-10-20 13:24:23 -07:00
plugin_interface_type.go Generate plugin types from the swagger spec. 2016-10-20 13:24:23 -07:00
plugin_mount.go Generate plugin types from the swagger spec. 2016-10-20 13:24:23 -07:00
plugin_responses.go Rename Remote API to Engine API 2016-11-22 12:49:38 +00:00
port.go Generate api/types:Port from swagger spec. 2016-10-20 13:24:23 -07:00
seccomp.go change minor mistake of spelling 2016-12-20 21:05:19 +08:00
service_update_response.go Return warnings from service create and service update when digest pinning fails 2016-11-18 09:31:31 -08:00
stats.go Add support for Names and ID in stats format 2016-11-03 07:20:46 +01:00
types.go Set expected response headers for Ping. 2017-01-03 11:47:47 -05:00
volume.go Return warnings from service create and service update when digest pinning fails 2016-11-18 09:31:31 -08:00