summaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/grpc/internal/resolver
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-12-15 15:18:02 +0100
committerPaul Holzinger <pholzing@redhat.com>2021-12-16 15:28:39 +0100
commit03a3fc37fe82800113a1c9043448acb2afa539a6 (patch)
tree216aae69ad45e33c18bd5af8eb37d8a16dae4050 /vendor/google.golang.org/grpc/internal/resolver
parentd1c91c128ea32dae3e9c56c657ea57dfed9f6ad4 (diff)
downloadpodman-03a3fc37fe82800113a1c9043448acb2afa539a6.tar.gz
podman-03a3fc37fe82800113a1c9043448acb2afa539a6.tar.bz2
podman-03a3fc37fe82800113a1c9043448acb2afa539a6.zip
bump cobra to 1.3.0
This contains some fixes for the shell completion files. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'vendor/google.golang.org/grpc/internal/resolver')
-rw-r--r--vendor/google.golang.org/grpc/internal/resolver/config_selector.go2
-rw-r--r--vendor/google.golang.org/grpc/internal/resolver/unix/unix.go12
2 files changed, 12 insertions, 2 deletions
diff --git a/vendor/google.golang.org/grpc/internal/resolver/config_selector.go b/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
index be7e13d58..c7a18a948 100644
--- a/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
+++ b/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
@@ -132,7 +132,7 @@ const csKey = csKeyType("grpc.internal.resolver.configSelector")
// SetConfigSelector sets the config selector in state and returns the new
// state.
func SetConfigSelector(state resolver.State, cs ConfigSelector) resolver.State {
- state.Attributes = state.Attributes.WithValues(csKey, cs)
+ state.Attributes = state.Attributes.WithValue(csKey, cs)
return state
}
diff --git a/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go b/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
index 0d5a811dd..20852e59d 100644
--- a/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
+++ b/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
@@ -37,7 +37,17 @@ func (b *builder) Build(target resolver.Target, cc resolver.ClientConn, _ resolv
if target.Authority != "" {
return nil, fmt.Errorf("invalid (non-empty) authority: %v", target.Authority)
}
- addr := resolver.Address{Addr: target.Endpoint}
+
+ // gRPC was parsing the dial target manually before PR #4817, and we
+ // switched to using url.Parse() in that PR. To avoid breaking existing
+ // resolver implementations we ended up stripping the leading "/" from the
+ // endpoint. This obviously does not work for the "unix" scheme. Hence we
+ // end up using the parsed URL instead.
+ endpoint := target.URL.Path
+ if endpoint == "" {
+ endpoint = target.URL.Opaque
+ }
+ addr := resolver.Address{Addr: endpoint}
if b.scheme == unixAbstractScheme {
// prepend "\x00" to address for unix-abstract
addr.Addr = "\x00" + addr.Addr