Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ DefaultGoldenThingAdminStub::AsyncGetOperation(
[this](grpc::ClientContext* context,
google::longrunning::GetOperationRequest const& request,
grpc::CompletionQueue* cq) {
return operations_->AsyncGetOperation(context, request, cq);
return operations_stub_->AsyncGetOperation(context, request, cq);
},
request, std::move(context));
}
Expand All @@ -450,7 +450,7 @@ future<Status> DefaultGoldenThingAdminStub::AsyncCancelOperation(
[this](grpc::ClientContext* context,
google::longrunning::CancelOperationRequest const& request,
grpc::CompletionQueue* cq) {
return operations_->AsyncCancelOperation(context, request, cq);
return operations_stub_->AsyncCancelOperation(context, request, cq);
},
request, std::move(context))
.then([](future<StatusOr<google::protobuf::Empty>> f) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,11 @@ class DefaultGoldenThingAdminStub : public GoldenThingAdminStub {
public:
DefaultGoldenThingAdminStub(
std::unique_ptr<google::test::admin::database::v1::GoldenThingAdmin::StubInterface> grpc_stub,
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub,
std::unique_ptr<google::cloud::location::Locations::StubInterface> locations_stub,
std::unique_ptr<google::longrunning::Operations::StubInterface> operations)
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub)
: grpc_stub_(std::move(grpc_stub)),
operations_stub_(std::move(operations_stub)),
locations_stub_(std::move(locations_stub)),
operations_(std::move(operations)) {}
operations_stub_(std::move(operations_stub)) {}

StatusOr<google::test::admin::database::v1::ListDatabasesResponse> ListDatabases(
grpc::ClientContext& context,
Expand Down Expand Up @@ -365,9 +363,8 @@ class DefaultGoldenThingAdminStub : public GoldenThingAdminStub {

private:
std::unique_ptr<google::test::admin::database::v1::GoldenThingAdmin::StubInterface> grpc_stub_;
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub_;
std::unique_ptr<google::cloud::location::Locations::StubInterface> locations_stub_;
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_;
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub_;
};

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ CreateDefaultGoldenThingAdminStub(
auto channel = auth->CreateChannel(
options.get<EndpointOption>(), internal::MakeChannelArguments(options));
auto service_grpc_stub = google::test::admin::database::v1::GoldenThingAdmin::NewStub(channel);
auto service_operations_stub = google::longrunning::Operations::NewStub(channel);
auto service_locations_stub = google::cloud::location::Locations::NewStub(channel);
std::shared_ptr<GoldenThingAdminStub> stub =
std::make_shared<DefaultGoldenThingAdminStub>(
std::move(service_grpc_stub), std::move(service_operations_stub), std::move(service_locations_stub),
std::move(service_grpc_stub), std::move(service_locations_stub),
google::longrunning::Operations::NewStub(channel));

if (auth->RequiresConfigureContext()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ DefaultRequestIdServiceStub::AsyncGetOperation(
[this](grpc::ClientContext* context,
google::longrunning::GetOperationRequest const& request,
grpc::CompletionQueue* cq) {
return operations_->AsyncGetOperation(context, request, cq);
return operations_stub_->AsyncGetOperation(context, request, cq);
},
request, std::move(context));
}
Expand All @@ -136,7 +136,7 @@ future<Status> DefaultRequestIdServiceStub::AsyncCancelOperation(
[this](grpc::ClientContext* context,
google::longrunning::CancelOperationRequest const& request,
grpc::CompletionQueue* cq) {
return operations_->AsyncCancelOperation(context, request, cq);
return operations_stub_->AsyncCancelOperation(context, request, cq);
},
request, std::move(context))
.then([](future<StatusOr<google::protobuf::Empty>> f) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ class DefaultRequestIdServiceStub : public RequestIdServiceStub {
public:
DefaultRequestIdServiceStub(
std::unique_ptr<google::test::requestid::v1::RequestIdService::StubInterface> grpc_stub,
std::unique_ptr<google::longrunning::Operations::StubInterface> operations)
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub)
: grpc_stub_(std::move(grpc_stub)),
operations_(std::move(operations)) {}
operations_stub_(std::move(operations_stub)) {}

StatusOr<google::test::requestid::v1::Foo> CreateFoo(
grpc::ClientContext& context,
Expand Down Expand Up @@ -128,7 +128,7 @@ class DefaultRequestIdServiceStub : public RequestIdServiceStub {

private:
std::unique_ptr<google::test::requestid::v1::RequestIdService::StubInterface> grpc_stub_;
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_;
std::unique_ptr<google::longrunning::Operations::StubInterface> operations_stub_;
};

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Expand Down
Loading