ChannelState.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #region Copyright notice and license
  2. // Copyright 2015 gRPC authors.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. #endregion
  16. using System;
  17. namespace Grpc.Core
  18. {
  19. /// <summary>
  20. /// Connectivity state of a channel.
  21. /// Based on grpc_connectivity_state from grpc/grpc.h
  22. /// </summary>
  23. public enum ChannelState
  24. {
  25. /// <summary>
  26. /// Channel is idle
  27. /// </summary>
  28. Idle,
  29. /// <summary>
  30. /// Channel is connecting
  31. /// </summary>
  32. Connecting,
  33. /// <summary>
  34. /// Channel is ready for work
  35. /// </summary>
  36. Ready,
  37. /// <summary>
  38. /// Channel has seen a failure but expects to recover
  39. /// </summary>
  40. TransientFailure,
  41. /// <summary>
  42. /// Channel has seen a failure that it cannot recover from
  43. /// </summary>
  44. Shutdown
  45. }
  46. }