Add comments to various functions

Don't export the notify subscribers method

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2015-12-10 14:11:00 -08:00
parent d9881ab912
commit e0da266b71
4 changed files with 28 additions and 19 deletions

View File

@@ -43,11 +43,6 @@ var daemonFlags = []cli.Flag{
Value: "/run/containerd",
Usage: "runtime state directory",
},
cli.IntFlag{
Name: "buffer-size",
Value: 2048,
Usage: "set the channel buffer size for events and signals",
},
cli.IntFlag{
Name: "c,concurrency",
Value: 10,
@@ -79,7 +74,6 @@ func main() {
context.String("id"),
context.String("state-dir"),
context.Int("concurrency"),
context.Int("buffer-size"),
); err != nil {
logrus.Fatal(err)
}
@@ -121,7 +115,7 @@ func processMetrics() {
}()
}
func daemon(id, stateDir string, concurrency, bufferSize int) error {
func daemon(id, stateDir string, concurrency int) error {
tasks := make(chan *containerd.StartTask, concurrency*100)
supervisor, err := containerd.NewSupervisor(id, stateDir, tasks)
if err != nil {
@@ -143,7 +137,7 @@ func daemon(id, stateDir string, concurrency, bufferSize int) error {
}
}
// start the signal handler in the background.
go startSignalHandler(supervisor, bufferSize)
go startSignalHandler(supervisor, containerd.DefaultBufferSize)
if err := supervisor.Start(); err != nil {
return err
}