containerd/pkg
Michael Crosby 2e8ea9fd6b Allow timeouts to be configured in config
This adds a singleton `timeout` package that will allow services and user
to configure timeouts in the daemon.  When a service wants to use a
timeout, it should declare a const and register it's default value
inside an `init()` function for that package.  When the default config
is generated, we can use the `timeout` package to provide the available
timeout keys so that a user knows that they can configure.

These show up in the config as follows:

```toml
[timeouts]
  "io.containerd.timeout.shim.cleanup" = 5
  "io.containerd.timeout.shim.load" = 5
  "io.containerd.timeout.shim.shutdown" = 3
  "io.containerd.timeout.task.state" = 2

```

Timeouts in the config are specified in seconds.

Timeouts are very hard to get right and giving this power to the user to
configure things is a huge improvement.  Machines can be faster and
slower and depending on the CPU or load of the machine, a timeout may
need to be adjusted.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-08-13 17:36:32 +00:00
..
dialer bump google.golang.org/grpc v1.20.1 2019-05-05 12:39:23 -07:00
oom Refactor runtime code for code sharing 2019-07-08 11:47:53 -04:00
process Refactor runtime code for code sharing 2019-07-08 11:47:53 -04:00
progress Fix linter errors 2019-07-14 20:49:40 -07:00
seed Seed random on ctr and containerd startup 2018-07-12 17:51:55 -07:00
stdio Refactor runtime code for code sharing 2019-07-08 11:47:53 -04:00
testutil fix: linter issue 2019-01-23 22:54:51 +08:00
timeout Allow timeouts to be configured in config 2019-08-13 17:36:32 +00:00
ttrpcutil Update pkg/ttrpcutil with improved pipe dial logic 2019-07-30 18:46:36 -07:00