Remove events from init context

Events from the init context have been replaced by the events plugin

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan
2023-05-30 18:04:09 -07:00
parent a81f3fb817
commit 2a60fe5a60
8 changed files with 19 additions and 20 deletions

View File

@@ -41,7 +41,6 @@ import (
"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/diff"
diffproxy "github.com/containerd/containerd/diff/proxy"
"github.com/containerd/containerd/events/exchange"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/pkg/dialer"
"github.com/containerd/containerd/pkg/timeout"
@@ -196,8 +195,6 @@ func New(ctx context.Context, config *srvconfig.Config) (*Server, error) {
ttrpcServer: ttrpcServer,
config: config,
}
// TODO: Remove this in 2.0 and let event plugin crease it
events = exchange.NewExchange()
initialized = plugin.NewPluginSet()
required = make(map[string]struct{})
)
@@ -215,7 +212,6 @@ func New(ctx context.Context, config *srvconfig.Config) (*Server, error) {
config.Root,
config.State,
)
initContext.Events = events
initContext.Address = config.GRPC.Address
initContext.TTRPCAddress = config.TTRPC.Address
initContext.RegisterReadiness = s.RegisterReadiness