Use proto.Marshal instead of calling Marshal() on objects

With google.golang.org/protobuf, proto-generated objects only have
ProtoReflect(). They don't have Marshal() anymore (see #6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2022-04-20 06:07:43 +00:00
parent 95dde4959d
commit aa1526defc
5 changed files with 13 additions and 6 deletions

View File

@@ -39,6 +39,7 @@ import (
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/pkg/process"
"github.com/containerd/containerd/protobuf"
"github.com/containerd/containerd/protobuf/proto"
ptypes "github.com/containerd/containerd/protobuf/types"
shimlog "github.com/containerd/containerd/runtime/v1"
"github.com/containerd/containerd/runtime/v1/shim"
@@ -305,7 +306,7 @@ func (l *remoteEventsPublisher) Publish(ctx context.Context, topic string, event
if err != nil {
return err
}
data, err := encoded.Marshal()
data, err := proto.Marshal(encoded)
if err != nil {
return err
}