Skip to content

Commit 48af7d1

Browse files
authored
fix(pubsublite): internal namespaces (#8680)
1 parent 8f2471c commit 48af7d1

34 files changed

+68
-68
lines changed

google/cloud/pubsublite/internal/alarm_registry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
namespace google {
2424
namespace cloud {
25-
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2625
namespace pubsublite_internal {
26+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2727

2828
/**
2929
* An `AlarmRegistry` allows the user to run a function at their own defined
@@ -59,8 +59,8 @@ class AlarmRegistry {
5959
std::chrono::milliseconds period, std::function<void()> on_alarm) = 0;
6060
};
6161

62-
} // namespace pubsublite_internal
6362
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
63+
} // namespace pubsublite_internal
6464
} // namespace cloud
6565
} // namespace google
6666

google/cloud/pubsublite/internal/alarm_registry_impl.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
namespace google {
2222
namespace cloud {
23-
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2423
namespace pubsublite_internal {
24+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2525

2626
AlarmRegistryImpl::AlarmRegistryImpl(google::cloud::CompletionQueue cq)
2727
: cq_{std::move(cq)} {}
@@ -74,7 +74,7 @@ std::unique_ptr<AlarmRegistry::CancelToken> AlarmRegistryImpl::RegisterAlarm(
7474
return absl::make_unique<CancelTokenImpl>(state);
7575
}
7676

77-
} // namespace pubsublite_internal
7877
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
78+
} // namespace pubsublite_internal
7979
} // namespace cloud
8080
} // namespace google

google/cloud/pubsublite/internal/alarm_registry_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
namespace google {
2525
namespace cloud {
26-
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2726
namespace pubsublite_internal {
27+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2828

2929
/**
3030
* Default implementation of `AlarmRegistry`.
@@ -77,8 +77,8 @@ class AlarmRegistryImpl : public AlarmRegistry {
7777
google::cloud::CompletionQueue const cq_;
7878
};
7979

80-
} // namespace pubsublite_internal
8180
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
81+
} // namespace pubsublite_internal
8282
} // namespace cloud
8383
} // namespace google
8484

google/cloud/pubsublite/internal/alarm_registry_impl_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
namespace google {
2727
namespace cloud {
28-
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2928
namespace pubsublite_internal {
29+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
3030
namespace {
3131

3232
using google::cloud::CompletionQueue;
@@ -146,7 +146,7 @@ TEST_F(AlarmRegistryImplTest, TokenDestroyedDuringSecondRun) {
146146
}
147147

148148
} // namespace
149-
} // namespace pubsublite_internal
150149
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
150+
} // namespace pubsublite_internal
151151
} // namespace cloud
152152
} // namespace google

google/cloud/pubsublite/internal/batching_options.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
namespace google {
2323
namespace cloud {
24-
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2524
namespace pubsublite_internal {
25+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2626

2727
/**
2828
* Batching options for a `Publisher`.
@@ -73,8 +73,8 @@ class BatchingOptions {
7373
std::chrono::milliseconds alarm_period_{50};
7474
};
7575

76-
} // namespace pubsublite_internal
7776
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
77+
} // namespace pubsublite_internal
7878
} // namespace cloud
7979
} // namespace google
8080

google/cloud/pubsublite/internal/cloud_region.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
namespace google {
1818
namespace cloud {
19-
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2019
namespace pubsublite_internal {
20+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2121

2222
StatusOr<CloudRegion> MakeCloudRegion(std::string const& region) {
2323
std::vector<std::string> splits = absl::StrSplit(region, '-');
@@ -27,7 +27,7 @@ StatusOr<CloudRegion> MakeCloudRegion(std::string const& region) {
2727
return CloudRegion{region};
2828
}
2929

30-
} // namespace pubsublite_internal
3130
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
31+
} // namespace pubsublite_internal
3232
} // namespace cloud
3333
} // namespace google

google/cloud/pubsublite/internal/cloud_region.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
namespace google {
2525
namespace cloud {
26-
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2726
namespace pubsublite_internal {
27+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2828

2929
/**
3030
* A wrapped string representing a Google Cloud region.
@@ -49,8 +49,8 @@ inline bool operator!=(CloudRegion const& a, CloudRegion const& b) {
4949
return !(a == b);
5050
}
5151

52-
} // namespace pubsublite_internal
5352
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
53+
} // namespace pubsublite_internal
5454
} // namespace cloud
5555
} // namespace google
5656

google/cloud/pubsublite/internal/cloud_zone.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
namespace google {
1818
namespace cloud {
19-
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2019
namespace pubsublite_internal {
20+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2121

2222
StatusOr<CloudZone> MakeCloudZone(std::string const& zone) {
2323
std::vector<std::string> splits = absl::StrSplit(zone, '-');
@@ -28,7 +28,7 @@ StatusOr<CloudZone> MakeCloudZone(std::string const& zone) {
2828
splits[2][0]};
2929
}
3030

31-
} // namespace pubsublite_internal
3231
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
32+
} // namespace pubsublite_internal
3333
} // namespace cloud
3434
} // namespace google

google/cloud/pubsublite/internal/cloud_zone.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
namespace google {
2626
namespace cloud {
27-
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2827
namespace pubsublite_internal {
28+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2929

3030
/**
3131
* A representation of a Google Cloud zone.
@@ -53,8 +53,8 @@ inline bool operator!=(CloudZone const& a, CloudZone const& b) {
5353
return !(a == b);
5454
}
5555

56-
} // namespace pubsublite_internal
5756
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
57+
} // namespace pubsublite_internal
5858
} // namespace cloud
5959
} // namespace google
6060

google/cloud/pubsublite/internal/default_routing_policy.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
namespace google {
2020
namespace cloud {
21-
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2221
namespace pubsublite_internal {
22+
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
2323

2424
// Uses the identity that `(a*b) % m == ((a % m) * (b % m)) % m`
2525
std::uint64_t ModPow(std::uint64_t val, std::uint64_t pow, std::uint32_t mod) {
@@ -60,7 +60,7 @@ std::uint64_t DefaultRoutingPolicy::Route(std::string const& message_key,
6060
num_partitions);
6161
}
6262

63-
} // namespace pubsublite_internal
6463
GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
64+
} // namespace pubsublite_internal
6565
} // namespace cloud
6666
} // namespace google

0 commit comments

Comments
 (0)