Use typeurl.Any instead of github.com/gogo/protobuf/types.Any

This commit upgrades github.com/containerd/typeurl to use typeurl.Any.
The interface hides gogo/protobuf/types.Any from containerd's Go client.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2022-03-22 00:40:39 +00:00
parent 551516a18d
commit 96b16b447d
42 changed files with 336 additions and 152 deletions

View File

@@ -25,8 +25,8 @@ import (
"github.com/containerd/containerd/events"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/pkg/ttrpcutil"
"github.com/containerd/containerd/protobuf"
"github.com/containerd/ttrpc"
"github.com/containerd/typeurl"
"github.com/sirupsen/logrus"
)
@@ -110,7 +110,7 @@ func (l *RemoteEventsPublisher) Publish(ctx context.Context, topic string, event
if err != nil {
return err
}
any, err := typeurl.MarshalAny(event)
any, err := protobuf.MarshalAnyToProto(event)
if err != nil {
return err
}