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
6 changed files with 16 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
# 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.

View File

@@ -27,7 +27,7 @@ import (
"syscall"
"time"
"github.com/sirupsen/logrus"
"github.com/containerd/log"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
@@ -368,7 +368,7 @@ func (c *Client) receiveLoop() error {
sid := streamID(msg.header.StreamID)
s := c.getStream(sid)
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
}
@@ -376,7 +376,7 @@ func (c *Client) receiveLoop() error {
s.closeWithError(err)
} else {
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"
"time"
"github.com/sirupsen/logrus"
"github.com/containerd/log"
"google.golang.org/grpc/codes"
"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)))
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)
continue
}
@@ -121,14 +121,14 @@ func (s *Server) Serve(ctx context.Context, l net.Listener) error {
approved, handshake, err := handshaker.Handshake(ctx, conn)
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()
continue
}
sc, err := s.newConn(approved, handshake)
if err != nil {
logrus.WithError(err).Error("ttrpc: create connection failed")
log.G(ctx).WithError(err).Error("ttrpc: create connection failed")
conn.Close()
continue
}
@@ -513,12 +513,12 @@ func (c *serverConn) run(sctx context.Context) {
Payload: response.data,
})
if err != nil {
logrus.WithError(err).Error("failed marshaling response")
log.G(ctx).WithError(err).Error("failed marshaling response")
return
}
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
}
} else {
@@ -530,7 +530,7 @@ func (c *serverConn) run(sctx context.Context) {
flags = flags | flagNoData
}
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
}
}
@@ -552,7 +552,7 @@ func (c *serverConn) run(sctx context.Context) {
// requests, so that the client connection is closed
return
}
logrus.WithError(err).Error("error receiving message")
log.G(ctx).WithError(err).Error("error receiving message")
// else, initiate shutdown
case <-shutdown:
return

2
vendor/modules.txt vendored
View File

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