api/events: split event types from events service
To avoid importing all of grpc when consuming events, the types of events have been split in to a separate package. This should allow a reduction in memory usage in cases where a package is consuming events but not using the gprc service directly. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/Microsoft/hcsshim"
|
||||
eventsapi "github.com/containerd/containerd/api/services/events/v1"
|
||||
eventstypes "github.com/containerd/containerd/api/events"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/log"
|
||||
"github.com/containerd/containerd/runtime"
|
||||
@@ -186,7 +186,7 @@ func (p *process) Start(ctx context.Context) (err error) {
|
||||
|
||||
p.task.publisher.Publish(ctx,
|
||||
runtime.TaskExitEventTopic,
|
||||
&eventsapi.TaskExit{
|
||||
&eventstypes.TaskExit{
|
||||
ContainerID: p.task.id,
|
||||
ID: p.id,
|
||||
Pid: p.pid,
|
||||
|
Reference in New Issue
Block a user