remote_daemon_options.go 599 B

12345678910111213141516171819202122
  1. package supervisor // import "github.com/docker/docker/libcontainerd/supervisor"
  2. // WithLogLevel defines which log level to start containerd with.
  3. func WithLogLevel(lvl string) DaemonOpt {
  4. return func(r *remote) error {
  5. if lvl == "info" {
  6. // both dockerd and containerd default log-level is "info",
  7. // so don't pass the default.
  8. lvl = ""
  9. }
  10. r.logLevel = lvl
  11. return nil
  12. }
  13. }
  14. // WithCRIDisabled disables the CRI plugin.
  15. func WithCRIDisabled() DaemonOpt {
  16. return func(r *remote) error {
  17. r.DisabledPlugins = append(r.DisabledPlugins, "io.containerd.grpc.v1.cri")
  18. return nil
  19. }
  20. }