use typeurl funcs for marshalling anypb.Any

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
This commit is contained in:
Akhil Mohan
2024-07-08 21:48:31 +05:30
parent cbb2fc78e9
commit 300fd770a0
36 changed files with 109 additions and 164 deletions

View File

@@ -29,6 +29,7 @@ import (
"github.com/containerd/containerd/v2/pkg/ttrpcutil"
"github.com/containerd/log"
"github.com/containerd/ttrpc"
"github.com/containerd/typeurl/v2"
)
const (
@@ -111,7 +112,7 @@ func (l *RemoteEventsPublisher) Publish(ctx context.Context, topic string, event
if err != nil {
return err
}
evt, err := protobuf.MarshalAnyToProto(event)
evt, err := typeurl.MarshalAnyToProto(event)
if err != nil {
return err
}