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:
@@ -41,6 +41,7 @@ func init() {
|
||||
Type: plugin.ServicePlugin,
|
||||
ID: services.ImagesService,
|
||||
Requires: []plugin.Type{
|
||||
plugin.EventPlugin,
|
||||
plugin.MetadataPlugin,
|
||||
plugin.GCPlugin,
|
||||
},
|
||||
@@ -54,9 +55,14 @@ func init() {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ep, err := ic.Get(plugin.EventPlugin)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &local{
|
||||
store: metadata.NewImageStore(m.(*metadata.DB)),
|
||||
publisher: ic.Events,
|
||||
publisher: ep.(events.Publisher),
|
||||
gc: g.(gcScheduler),
|
||||
}, nil
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user