enhance: split config from server package
The github.com/containerd/containerd/services/server has a lot of dependencies, like content, snapshots services implementation and docker-metrics. For the client side, it uses the config struct from server package to start up the containerd in background. It will import a lot of useless packages which might be conflict with existing vendor's package. It makes integration easier with single config package. Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
@@ -22,12 +22,13 @@ import (
|
||||
|
||||
"github.com/containerd/cgroups"
|
||||
"github.com/containerd/containerd/log"
|
||||
srvconfig "github.com/containerd/containerd/services/server/config"
|
||||
"github.com/containerd/containerd/sys"
|
||||
specs "github.com/opencontainers/runtime-spec/specs-go"
|
||||
)
|
||||
|
||||
// apply sets config settings on the server process
|
||||
func apply(ctx context.Context, config *Config) error {
|
||||
func apply(ctx context.Context, config *srvconfig.Config) error {
|
||||
if config.OOMScore != 0 {
|
||||
log.G(ctx).Debugf("changing OOM score to %d", config.OOMScore)
|
||||
if err := sys.SetOOMScore(os.Getpid(), config.OOMScore); err != nil {
|
||||
|
Reference in New Issue
Block a user