moby--moby/docs/reference/api
Vincent Batts 4026512a2c events/jsonmessage: add and prefer TimeNano for events
This way provide both Time and TimeNano in the event. For the display of
the JSONMessage, use either, but prefer TimeNano Proving only TimeNano
would break Subscribers that are using the `Time` field, so both are set
for backwards compatibility.

The events logging uses nano formatting, but only provides a Unix()
time, therefor ordering may get lost in the output. Example:
```
2015-09-15T14:18:51.000000000-04:00 ee46febd64ac629f7de9cd8bf58582e6f263d97ff46896adc5b508db804682da: (from busybox) resize
2015-09-15T14:18:51.000000000-04:00 a78c9149b1c0474502a117efaa814541926c2ae6ec3c76607e1c931b84c3a44b: (from busybox) resize
```

By having a field just for Nano time, when set, the marshalling back to
`time.Unix(sec int64, nsec int64)` has zeros exactly where it needs to.
This does not break any existing use of jsonmessage.JSONMessage, but now
allows for use of `UnixNano()` and get event formatting that has
distinguishable order. Example:
```
2015-09-15T15:37:23.810295632-04:00 6adcf8ed9f5f5ec059a915466cd1cde86a18b4a085fc3af405e9cc9fecbbbbaf: (from busybox) resize
2015-09-15T15:37:23.810412202-04:00 6b7c5bfdc3f902096f5a91e628f21bd4b56e32590c5b4b97044aafc005ddcb0d: (from busybox) resize
```

Including tests for TimeNano and updated event API reference doc.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-09-18 13:15:26 -04:00
..
_static
images
README.md
docker-io_api.md
docker_io_accounts_api.md
docker_remote_api.md events/jsonmessage: add and prefer TimeNano for events 2015-09-18 13:15:26 -04:00
docker_remote_api_v1.0.md
docker_remote_api_v1.1.md
docker_remote_api_v1.2.md
docker_remote_api_v1.3.md
docker_remote_api_v1.4.md
docker_remote_api_v1.5.md
docker_remote_api_v1.6.md
docker_remote_api_v1.7.md
docker_remote_api_v1.8.md
docker_remote_api_v1.9.md
docker_remote_api_v1.10.md
docker_remote_api_v1.11.md
docker_remote_api_v1.12.md
docker_remote_api_v1.13.md
docker_remote_api_v1.14.md
docker_remote_api_v1.15.md
docker_remote_api_v1.16.md
docker_remote_api_v1.17.md
docker_remote_api_v1.18.md
docker_remote_api_v1.19.md
docker_remote_api_v1.20.md
docker_remote_api_v1.21.md events/jsonmessage: add and prefer TimeNano for events 2015-09-18 13:15:26 -04:00
hub_registry_spec.md
registry_api.md
registry_api_client_libraries.md
remote_api_client_libraries.md

README.md

This directory holds the authoritative specifications of APIs defined and implemented by Docker. Currently this includes:

  • The remote API by which a docker node can be queried over HTTP
  • The registry API by which a docker node can download and upload images for storage and sharing
  • The index search API by which a docker node can search the public index for images to download
  • The docker.io OAuth and accounts API which 3rd party services can use to access account information