mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
protobuf: remove gogoproto
Removes gogo/protobuf from buildx and updates to a version of moby/buildkit where gogo is removed. This also changes how the proto files are generated. This is because newer versions of protobuf are more strict about name conflicts. If two files have the same name (even if they are relative paths) and are used in different protoc commands, they'll conflict in the registry. Since protobuf file generation doesn't work very well with `paths=source_relative`, this removes the `go:generate` expression and just relies on the dockerfile to perform the generation. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
30
vendor/google.golang.org/grpc/peer/peer.go
generated
vendored
30
vendor/google.golang.org/grpc/peer/peer.go
generated
vendored
@ -22,7 +22,9 @@ package peer
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"google.golang.org/grpc/credentials"
|
||||
)
|
||||
@ -39,6 +41,34 @@ type Peer struct {
|
||||
AuthInfo credentials.AuthInfo
|
||||
}
|
||||
|
||||
// String ensures the Peer types implements the Stringer interface in order to
|
||||
// allow to print a context with a peerKey value effectively.
|
||||
func (p *Peer) String() string {
|
||||
if p == nil {
|
||||
return "Peer<nil>"
|
||||
}
|
||||
sb := &strings.Builder{}
|
||||
sb.WriteString("Peer{")
|
||||
if p.Addr != nil {
|
||||
fmt.Fprintf(sb, "Addr: '%s', ", p.Addr.String())
|
||||
} else {
|
||||
fmt.Fprintf(sb, "Addr: <nil>, ")
|
||||
}
|
||||
if p.LocalAddr != nil {
|
||||
fmt.Fprintf(sb, "LocalAddr: '%s', ", p.LocalAddr.String())
|
||||
} else {
|
||||
fmt.Fprintf(sb, "LocalAddr: <nil>, ")
|
||||
}
|
||||
if p.AuthInfo != nil {
|
||||
fmt.Fprintf(sb, "AuthInfo: '%s'", p.AuthInfo.AuthType())
|
||||
} else {
|
||||
fmt.Fprintf(sb, "AuthInfo: <nil>")
|
||||
}
|
||||
sb.WriteString("}")
|
||||
|
||||
return sb.String()
|
||||
}
|
||||
|
||||
type peerKey struct{}
|
||||
|
||||
// NewContext creates a new context with peer information attached.
|
||||
|
Reference in New Issue
Block a user