Commit Graph

29 Commits

Author SHA1 Message Date
Brian Goff
6ab99edb71 Convert ExitStatus to use fn to get details
Instead of requiring callers to read the struct fields to check for an
error, provide the exit results via a function instead which is more
natural.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-08-22 10:48:44 -04:00
Brian Goff
026896ac4c Make Wait() async
In all of the examples, its recommended to call `Wait()` before starting
a process/task.
Since `Wait()` is a blocking call, this means it must be called from a
goroutine like so:

```go
statusC := make(chan uint32)
go func() {
  status, err := task.Wait(ctx)
  if err != nil {
    // handle async err
  }

  statusC <- status
}()

task.Start(ctx)
<-statusC
```

This means there is a race here where there is no guarentee when the
goroutine is going to be scheduled, and even a bit more since this
requires an RPC call to be made.
In addition, this code is very messy and a common pattern for any caller
using Wait+Start.

Instead, this changes `Wait()` to use an async model having `Wait()`
return a channel instead of the code itself.
This ensures that when `Wait()` returns that the client has a handle on
the event stream (already made the RPC request) before returning and
reduces any sort of race to how the stream is handled by grpc since we
can't guarentee that we have a goroutine running and blocked on
`Recv()`.

Making `Wait()` async also cleans up the code in the caller drastically:

```go
statusC, err := task.Wait(ctx)
if err != nil {
  return err
}

task.Start(ctx)

status := <-statusC
if status.Err != nil {
  return err
}
```

No more spinning up goroutines and more natural error
handling for the caller.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-08-22 09:33:07 -04:00
Michael Crosby
b1eb1103a8 Add section for state dir
Closes #1286

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-11 16:54:42 -04:00
Phil Estes
f90fa4e121
Minor updates to the namespaces doc
Add info on labels. Some wording updates.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2017-08-10 11:08:03 -04:00
Michael Crosby
7a40eaabe8 Add namespace doc for containerd
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-10 10:22:23 -04:00
Michael Crosby
1907116bdd Add doc for extending client opts
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-08 15:39:59 -04:00
Michael Crosby
a543d05708 Add ops guide for containerd
This adds an explaination to some of the config file settings and what
the accomplish in containerd.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-07 14:41:27 -04:00
Michael Crosby
d6c171ea89 Add getting started guide
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-08-07 09:17:27 -04:00
Patrick Chanezon
16f04383ae retrying pr for website to satify cncf guidelines
Signed-off-by: Patrick Chanezon <patlist@chanezon.com>

fixing validation issue for whitespace

Signed-off-by: Patrick Chanezon <patlist@chanezon.com>
2017-06-16 14:30:31 -07:00
David Lyle
04f76c5505 fix relative image paths
Signed-off-by: David Lyle <david.lyle@intel.com>
2017-04-21 12:27:05 -06:00
Li Li
6ae973362a Update dockercon-summit.md 2017-04-20 01:31:00 -05:00
Ross Boucher
9999e85f80 Checkpoint/Restore proposal 2017-04-19 08:57:10 -05:00
Fabio Kung
f401bec0fd containerd summit: suggest a discussion about disk quotas
Signed-off-by: Fabio Kung <fabio.kung@gmail.com>
2017-04-13 11:19:55 -07:00
Michael Crosby
4f2b443a27 Rewrite imports for new github org
This rewrites the Go imports after switching to the new github org.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-04-03 14:05:44 -07:00
Michael Crosby
c6f2193c28 Merge branch 'master' into patch-1 2017-04-03 11:42:50 -07:00
Random-Liu
803a60eaac Propose discussion of image filesystem metrics.
Signed-off-by: Lantao Liu <lantaol@google.com>
2017-03-31 17:08:08 -07:00
Liz Rice
f0d1c19a0f Propose discussion of Authorization plugin
Signed-off-by: Liz Rice <liz@lizrice.com>
2017-03-31 17:08:16 +01:00
Michael Crosby
58b0baf585 Add logo/assets
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-28 09:33:33 -07:00
Patrick Chanezon
06d5068055 removed unused images
Signed-off-by: Patrick Chanezon <patlist@chanezon.com>
2017-03-17 12:09:03 -07:00
Patrick Chanezon
ecc0cc14c6 added website code for containerd.io
Signed-off-by: Patrick Chanezon <patlist@chanezon.com>
2017-03-15 13:14:10 -07:00
Michael Crosby
1f15b058d2 Add link to signup form
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-10 11:40:27 -08:00
Michael Crosby
ee2d005984 Add dockercon summit discussion points
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-03-10 10:51:53 -08:00
Michael Crosby
e115b52ce2 Remove containerd files
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-11-07 13:10:09 -08:00
Harry Zhang
96ee432674 Refactoring minor fix
Signed-off-by: Harry Zhang <harryz@hyper.sh>
2016-06-30 23:13:04 -04:00
Ben Firshman
6228054b6f Move docs in readme to separate pages
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-04-06 14:14:51 -07:00
Qiang Huang
8dc52a6461 Update bundle.md
As we only have config.json in specs now.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-03-22 15:07:27 +08:00
Brian Goff
866ad6fe1d fix some docs typos and wording
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-12-17 16:02:58 -05:00
Michael Crosby
83eeb131d8 Update readme and documentation for release
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-16 12:15:22 -08:00
Michael Crosby
b3645c066d Add bundle documentation
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-07 14:15:12 -08:00