diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-12-06 23:43:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 23:43:25 +0000 |
commit | 49f589d7c36b6d52105a94493baf1664a3ada79c (patch) | |
tree | a8007cc755dc588312474bf27a1e996381731a9b /vendor/google.golang.org/grpc/connectivity | |
parent | 1aeb61cf5cfb0155ebcff3b449c5ea4bf8f15dc1 (diff) | |
parent | 014bbdb40a8a91ea59b8e4953c843ad4c4a69156 (diff) | |
download | podman-49f589d7c36b6d52105a94493baf1664a3ada79c.tar.gz podman-49f589d7c36b6d52105a94493baf1664a3ada79c.tar.bz2 podman-49f589d7c36b6d52105a94493baf1664a3ada79c.zip |
Merge pull request #12525 from mheon/bump_343
Backports for and bump to v3.4.3
Diffstat (limited to 'vendor/google.golang.org/grpc/connectivity')
-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" + } +} |