Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
Remove include/grpc/impl/codegen/connectivity_state.h (grpc#31728)
Browse files Browse the repository at this point in the history
* Remove `include/grpc/impl/codegen/connectivity_state.h`

* Automated change: Fix sanity tests

* Automated change: Fix sanity tests
  • Loading branch information
ralphchung authored Dec 12, 2022
1 parent a6843d4 commit 2e9e643
Show file tree
Hide file tree
Showing 50 changed files with 104 additions and 56 deletions.
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ GRPC_PUBLIC_HDRS = [
"include/grpc/impl/codegen/status.h",
"include/grpc/impl/codegen/slice.h",
"include/grpc/impl/compression_types.h",
"include/grpc/impl/connectivity_state.h",
]

GRPC_PUBLIC_EVENT_ENGINE_HDRS = [
Expand Down
3 changes: 3 additions & 0 deletions CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions build_autogenerated.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions gRPC-Core.podspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions grpc.gemspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions include/grpc/grpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#include <stddef.h>

#include <grpc/byte_buffer.h>
#include <grpc/impl/codegen/connectivity_state.h> // IWYU pragma: export
#include <grpc/impl/codegen/grpc_types.h> // IWYU pragma: export
#include <grpc/impl/codegen/grpc_types.h> // IWYU pragma: export
#include <grpc/impl/codegen/propagation_bits.h>
#include <grpc/impl/connectivity_state.h> // IWYU pragma: export
#include <grpc/slice.h>
#include <grpc/status.h>
#include <grpc/support/time.h>
Expand Down
23 changes: 3 additions & 20 deletions include/grpc/impl/codegen/connectivity_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,9 @@
// IWYU pragma: private, include <grpc/grpc.h>
// IWYU pragma: friend "src/.*"

#ifdef __cplusplus
extern "C" {
#endif
#include <grpc/support/port_platform.h>

/** Connectivity state of a channel. */
typedef enum {
/** channel is idle */
GRPC_CHANNEL_IDLE,
/** channel is connecting */
GRPC_CHANNEL_CONNECTING,
/** channel is ready for work */
GRPC_CHANNEL_READY,
/** channel has seen a failure but expects to recover */
GRPC_CHANNEL_TRANSIENT_FAILURE,
/** channel has seen a failure that it cannot recover from */
GRPC_CHANNEL_SHUTDOWN
} grpc_connectivity_state;

#ifdef __cplusplus
}
#endif
/// TODO(chengyuc): Remove this file after solving compatibility.
#include <grpc/impl/connectivity_state.h>

#endif /* GRPC_IMPL_CODEGEN_CONNECTIVITY_STATE_H */
47 changes: 47 additions & 0 deletions include/grpc/impl/connectivity_state.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
*
* Copyright 2016 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

#ifndef GRPC_IMPL_CONNECTIVITY_STATE_H
#define GRPC_IMPL_CONNECTIVITY_STATE_H

// IWYU pragma: private, include <grpc/grpc.h>
// IWYU pragma: friend "src/.*"

#ifdef __cplusplus
extern "C" {
#endif

/** Connectivity state of a channel. */
typedef enum {
/** channel is idle */
GRPC_CHANNEL_IDLE,
/** channel is connecting */
GRPC_CHANNEL_CONNECTING,
/** channel is ready for work */
GRPC_CHANNEL_READY,
/** channel has seen a failure but expects to recover */
GRPC_CHANNEL_TRANSIENT_FAILURE,
/** channel has seen a failure that it cannot recover from */
GRPC_CHANNEL_SHUTDOWN
} grpc_connectivity_state;

#ifdef __cplusplus
}
#endif

#endif /* GRPC_IMPL_CONNECTIVITY_STATE_H */
1 change: 1 addition & 0 deletions include/grpc/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ header "byte_buffer.h"
header "impl/codegen/sync_abseil.h"
header "impl/codegen/sync_generic.h"
header "impl/compression_types.h"
header "impl/connectivity_state.h"
header "load_reporting.h"
header "slice.h"
header "slice_buffer.h"
Expand Down
2 changes: 1 addition & 1 deletion include/grpcpp/impl/channel_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef GRPCPP_IMPL_CHANNEL_INTERFACE_H
#define GRPCPP_IMPL_CHANNEL_INTERFACE_H

#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpcpp/impl/call.h>
#include <grpcpp/support/status.h>
#include <grpcpp/support/time.h>
Expand Down
1 change: 1 addition & 0 deletions package.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/core/ext/filters/channel_idle/channel_idle_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "absl/status/status.h"
#include "absl/status/statusor.h"

#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>

#include "src/core/ext/filters/channel_idle/idle_filter_state.h"
#include "src/core/lib/channel/channel_args.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

#include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>

Expand Down
2 changes: 1 addition & 1 deletion src/core/ext/filters/client_channel/client_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"

#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/atm.h>

#include "src/core/ext/filters/client_channel/client_channel_factory.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include "absl/base/thread_annotations.h"

#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/slice.h>

#include "src/core/lib/channel/channel_trace.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "upb/upb.h"
#include "upb/upb.hpp"

#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/slice.h>
#include <grpc/status.h>
#include <grpc/support/log.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "absl/strings/string_view.h"

#include <grpc/event_engine/event_engine.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/lib/channel/channel_args.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
#include <grpc/byte_buffer.h>
#include <grpc/byte_buffer_reader.h>
#include <grpc/grpc.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/codegen/propagation_bits.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/slice.h>
#include <grpc/status.h>
#include <grpc/support/alloc.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "upb/upb.hpp"
#include "xds/service/orca/v3/orca.upb.h"

#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/slice.h>
#include <grpc/status.h>
#include <grpc/support/alloc.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "absl/types/variant.h"

#include <grpc/event_engine/event_engine.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"

#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/ext/filters/client_channel/lb_policy/subchannel_list.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include "absl/types/optional.h"

#include <grpc/event_engine/event_engine.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/ext/filters/client_channel/lb_policy/address_filtering.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#define XXH_INLINE_ALL
#include "xxhash.h"

#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/ext/filters/client_channel/client_channel.h"
Expand Down
2 changes: 1 addition & 1 deletion src/core/ext/filters/client_channel/lb_policy/rls/rls.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
#include <grpc/byte_buffer_reader.h>
#include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/codegen/propagation_bits.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/slice.h>
#include <grpc/status.h>
#include <grpc/support/log.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"

#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/ext/filters/client_channel/lb_policy/subchannel_list.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "absl/status/status.h"
#include "absl/types/optional.h"

#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/lib/channel/channel_args.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "absl/types/optional.h"

#include <grpc/event_engine/event_engine.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/ext/filters/client_channel/lb_policy/address_filtering.h"
Expand Down
2 changes: 1 addition & 1 deletion src/core/ext/filters/client_channel/lb_policy/xds/cds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <grpc/event_engine/event_engine.h>
#include <grpc/grpc.h>
#include <grpc/grpc_security.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "absl/types/variant.h"

#include <grpc/event_engine/event_engine.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "absl/types/optional.h"

#include <grpc/event_engine/event_engine.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/ext/filters/client_channel/client_channel.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
#include "absl/types/optional.h"

#include <grpc/event_engine/event_engine.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/support/log.h>

#include "src/core/ext/filters/client_channel/lb_policy/address_filtering.h"
Expand Down
Loading

0 comments on commit 2e9e643

Please sign in to comment.