diff options
author | Matthew Heon <mheon@redhat.com> | 2021-12-06 13:55:54 -0500 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-12-06 13:55:54 -0500 |
commit | 8dc94f1be5fd410461f08992c9a176e95ef36169 (patch) | |
tree | 9a94ac3938e4353cc2ad78014e5e029d7cc95d67 /vendor/google.golang.org/grpc/connectivity/connectivity.go | |
parent | 274a76e06864d33470152cad42b81f8501f56b8c (diff) | |
download | podman-8dc94f1be5fd410461f08992c9a176e95ef36169.tar.gz podman-8dc94f1be5fd410461f08992c9a176e95ef36169.tar.bz2 podman-8dc94f1be5fd410461f08992c9a176e95ef36169.zip |
Bump to containers/image v5.17.0
This resolves CVE-2021-41190
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'vendor/google.golang.org/grpc/connectivity/connectivity.go')
-rw-r--r-- | vendor/google.golang.org/grpc/connectivity/connectivity.go | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/vendor/google.golang.org/grpc/connectivity/connectivity.go b/vendor/google.golang.org/grpc/connectivity/connectivity.go index 010156261..4a8992642 100644 --- a/vendor/google.golang.org/grpc/connectivity/connectivity.go +++ b/vendor/google.golang.org/grpc/connectivity/connectivity.go @@ -18,7 +18,6 @@ // Package connectivity defines connectivity semantics. // For details, see https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md. -// All APIs in this package are experimental. package connectivity import ( @@ -45,7 +44,7 @@ func (s State) String() string { return "SHUTDOWN" default: logger.Errorf("unknown connectivity state: %d", s) - return "Invalid-State" + return "INVALID_STATE" } } @@ -61,3 +60,35 @@ const ( // Shutdown indicates the ClientConn has started shutting down. Shutdown ) + +// ServingMode indicates the current mode of operation of the server. +// +// Only xDS enabled gRPC servers currently report their serving mode. +type ServingMode int + +const ( + // ServingModeStarting indicates that the server is starting up. + ServingModeStarting ServingMode = iota + // ServingModeServing indicates that the server contains all required + // configuration and is serving RPCs. + ServingModeServing + // ServingModeNotServing indicates that the server is not accepting new + // connections. Existing connections will be closed gracefully, allowing + // in-progress RPCs to complete. A server enters this mode when it does not + // contain the required configuration to serve RPCs. + ServingModeNotServing +) + +func (s ServingMode) String() string { + switch s { + case ServingModeStarting: + return "STARTING" + case ServingModeServing: + return "SERVING" + case ServingModeNotServing: + return "NOT_SERVING" + default: + logger.Errorf("unknown serving mode: %d", s) + return "INVALID_MODE" + } +} |