vendor: github.com/containerd/ttrpc v1.2.5

full diff: https://github.com/containerd/ttrpc/compare/v1.2.4...v1.2.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2024-06-25 22:59:01 +02:00
parent a3c8a72b54
commit dbdd3601eb
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
6 changed files with 16 additions and 16 deletions

2
go.mod
View File

@ -82,7 +82,7 @@ require (
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/containerd/ttrpc v1.2.4 // indirect github.com/containerd/ttrpc v1.2.5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.2 // indirect github.com/docker/docker-credential-helpers v0.8.2 // indirect

4
go.sum
View File

@ -105,8 +105,8 @@ github.com/containerd/nydus-snapshotter v0.13.7/go.mod h1:VPVKQ3jmHFIcUIV2yiQ1kI
github.com/containerd/stargz-snapshotter v0.15.1 h1:fpsP4kf/Z4n2EYnU0WT8ZCE3eiKDwikDhL6VwxIlgeA= github.com/containerd/stargz-snapshotter v0.15.1 h1:fpsP4kf/Z4n2EYnU0WT8ZCE3eiKDwikDhL6VwxIlgeA=
github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU= github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU=
github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk=
github.com/containerd/ttrpc v1.2.4 h1:eQCQK4h9dxDmpOb9QOOMh2NHTfzroH1IkmHiKZi05Oo= github.com/containerd/ttrpc v1.2.5 h1:IFckT1EFQoFBMG4c3sMdT8EP3/aKfumK1msY+Ze4oLU=
github.com/containerd/ttrpc v1.2.4/go.mod h1:ojvb8SJBSch0XkqNO0L0YX/5NxR3UnVk2LzFKBK0upc= github.com/containerd/ttrpc v1.2.5/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o=
github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4=
github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=

View File

@ -1,6 +1,6 @@
# ttrpc # ttrpc
[![Build Status](https://github.com/containerd/ttrpc/workflows/CI/badge.svg)](https://github.com/containerd/ttrpc/actions?query=workflow%3ACI) [![Build Status](https://github.com/containerd/ttrpc/actions/workflows/ci.yml/badge.svg)](https://github.com/containerd/ttrpc/actions/workflows/ci.yml)
GRPC for low-memory environments. GRPC for low-memory environments.

View File

@ -27,7 +27,7 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/sirupsen/logrus" "github.com/containerd/log"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
@ -368,7 +368,7 @@ func (c *Client) receiveLoop() error {
sid := streamID(msg.header.StreamID) sid := streamID(msg.header.StreamID)
s := c.getStream(sid) s := c.getStream(sid)
if s == nil { if s == nil {
logrus.WithField("stream", sid).Errorf("ttrpc: received message on inactive stream") log.G(c.ctx).WithField("stream", sid).Error("ttrpc: received message on inactive stream")
continue continue
} }
@ -376,7 +376,7 @@ func (c *Client) receiveLoop() error {
s.closeWithError(err) s.closeWithError(err)
} else { } else {
if err := s.receive(c.ctx, msg); err != nil { if err := s.receive(c.ctx, msg); err != nil {
logrus.WithError(err).WithField("stream", sid).Errorf("ttrpc: failed to handle message") log.G(c.ctx).WithFields(log.Fields{"error": err, "stream": sid}).Error("ttrpc: failed to handle message")
} }
} }
} }

View File

@ -27,7 +27,7 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/sirupsen/logrus" "github.com/containerd/log"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
) )
@ -109,7 +109,7 @@ func (s *Server) Serve(ctx context.Context, l net.Listener) error {
} }
sleep := time.Duration(rand.Int63n(int64(backoff))) sleep := time.Duration(rand.Int63n(int64(backoff)))
logrus.WithError(err).Errorf("ttrpc: failed accept; backoff %v", sleep) log.G(ctx).WithError(err).Errorf("ttrpc: failed accept; backoff %v", sleep)
time.Sleep(sleep) time.Sleep(sleep)
continue continue
} }
@ -121,14 +121,14 @@ func (s *Server) Serve(ctx context.Context, l net.Listener) error {
approved, handshake, err := handshaker.Handshake(ctx, conn) approved, handshake, err := handshaker.Handshake(ctx, conn)
if err != nil { if err != nil {
logrus.WithError(err).Error("ttrpc: refusing connection after handshake") log.G(ctx).WithError(err).Error("ttrpc: refusing connection after handshake")
conn.Close() conn.Close()
continue continue
} }
sc, err := s.newConn(approved, handshake) sc, err := s.newConn(approved, handshake)
if err != nil { if err != nil {
logrus.WithError(err).Error("ttrpc: create connection failed") log.G(ctx).WithError(err).Error("ttrpc: create connection failed")
conn.Close() conn.Close()
continue continue
} }
@ -513,12 +513,12 @@ func (c *serverConn) run(sctx context.Context) {
Payload: response.data, Payload: response.data,
}) })
if err != nil { if err != nil {
logrus.WithError(err).Error("failed marshaling response") log.G(ctx).WithError(err).Error("failed marshaling response")
return return
} }
if err := ch.send(response.id, messageTypeResponse, 0, p); err != nil { if err := ch.send(response.id, messageTypeResponse, 0, p); err != nil {
logrus.WithError(err).Error("failed sending message on channel") log.G(ctx).WithError(err).Error("failed sending message on channel")
return return
} }
} else { } else {
@ -530,7 +530,7 @@ func (c *serverConn) run(sctx context.Context) {
flags = flags | flagNoData flags = flags | flagNoData
} }
if err := ch.send(response.id, messageTypeData, flags, response.data); err != nil { if err := ch.send(response.id, messageTypeData, flags, response.data); err != nil {
logrus.WithError(err).Error("failed sending message on channel") log.G(ctx).WithError(err).Error("failed sending message on channel")
return return
} }
} }
@ -552,7 +552,7 @@ func (c *serverConn) run(sctx context.Context) {
// requests, so that the client connection is closed // requests, so that the client connection is closed
return return
} }
logrus.WithError(err).Error("error receiving message") log.G(ctx).WithError(err).Error("error receiving message")
// else, initiate shutdown // else, initiate shutdown
case <-shutdown: case <-shutdown:
return return

2
vendor/modules.txt vendored
View File

@ -201,7 +201,7 @@ github.com/containerd/errdefs
# github.com/containerd/log v0.1.0 # github.com/containerd/log v0.1.0
## explicit; go 1.20 ## explicit; go 1.20
github.com/containerd/log github.com/containerd/log
# github.com/containerd/ttrpc v1.2.4 # github.com/containerd/ttrpc v1.2.5
## explicit; go 1.19 ## explicit; go 1.19
github.com/containerd/ttrpc github.com/containerd/ttrpc
# github.com/containerd/typeurl/v2 v2.1.1 # github.com/containerd/typeurl/v2 v2.1.1