Skip to content

Commit

Permalink
[transport] remove GetEndpoint() method (grpc#36597)
Browse files Browse the repository at this point in the history
Closes grpc#36597

COPYBARA_INTEGRATE_REVIEW=grpc#36597 from markdroth:transport_endpoint_cleanup 6bd73e4
PiperOrigin-RevId: 636714985
  • Loading branch information
markdroth authored and paulosjca committed May 23, 2024
1 parent afd5b00 commit 0874aa1
Show file tree
Hide file tree
Showing 12 changed files with 1 addition and 23 deletions.
5 changes: 0 additions & 5 deletions src/core/ext/transport/binder/transport/binder_transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,6 @@ void grpc_binder_transport::Orphan() {
absl::OkStatus());
}

grpc_endpoint* grpc_binder_transport::GetEndpoint() {
gpr_log(GPR_INFO, __func__);
return nullptr;
}

size_t grpc_binder_transport::SizeOfStream() const {
return sizeof(grpc_binder_stream);
}
Expand Down
1 change: 0 additions & 1 deletion src/core/ext/transport/binder/transport/binder_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ struct grpc_binder_transport final : public grpc_core::FilterStackTransport {
void SetPollset(grpc_stream*, grpc_pollset*) override {}
void SetPollsetSet(grpc_stream*, grpc_pollset_set*) override {}
void PerformOp(grpc_transport_op* op) override;
grpc_endpoint* GetEndpoint() override;
size_t SizeOfStream() const override;
bool HackyDisableStreamOpBatchCoalescingInConnectedChannel() const override {
return false;
Expand Down
1 change: 0 additions & 1 deletion src/core/ext/transport/chaotic_good/client_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ class ChaoticGoodClientTransport final : public ClientTransport {
void SetPollset(grpc_stream*, grpc_pollset*) override {}
void SetPollsetSet(grpc_stream*, grpc_pollset_set*) override {}
void PerformOp(grpc_transport_op*) override;
grpc_endpoint* GetEndpoint() override { return nullptr; }
void Orphan() override {
AbortWithError();
Unref();
Expand Down
3 changes: 1 addition & 2 deletions src/core/ext/transport/chaotic_good/server_transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class ChaoticGoodServerTransport final : public ServerTransport {
void SetPollset(grpc_stream*, grpc_pollset*) override {}
void SetPollsetSet(grpc_stream*, grpc_pollset_set*) override {}
void PerformOp(grpc_transport_op*) override;
grpc_endpoint* GetEndpoint() override { return nullptr; }
void Orphan() override;

void SetCallDestination(
Expand Down Expand Up @@ -158,4 +157,4 @@ class ChaoticGoodServerTransport final : public ServerTransport {
} // namespace chaotic_good
} // namespace grpc_core

#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_SERVER_TRANSPORT_H
#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHAOTIC_GOOD_SERVER_TRANSPORT_H
2 changes: 0 additions & 2 deletions src/core/ext/transport/chttp2/transport/chttp2_transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3168,8 +3168,6 @@ const char* grpc_chttp2_initiate_write_reason_string(
GPR_UNREACHABLE_CODE(return "unknown");
}

grpc_endpoint* grpc_chttp2_transport::GetEndpoint() { return ep; }

size_t grpc_chttp2_transport::SizeOfStream() const {
return sizeof(grpc_chttp2_stream);
}
Expand Down
1 change: 0 additions & 1 deletion src/core/ext/transport/chttp2/transport/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ struct grpc_chttp2_transport final : public grpc_core::FilterStackTransport,
void SetPollsetSet(grpc_stream* stream,
grpc_pollset_set* pollset_set) override;
void PerformOp(grpc_transport_op* op) override;
grpc_endpoint* GetEndpoint() override;

grpc_endpoint* ep;
grpc_core::Slice peer_string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ struct grpc_cronet_transport final : public grpc_core::FilterStackTransport {
void SetPollsetSet(grpc_stream* /*stream*/,
grpc_pollset_set* /*pollset_set*/) override {}
void PerformOp(grpc_transport_op* op) override;
grpc_endpoint* GetEndpoint() override { return nullptr; }
size_t SizeOfStream() const override;
void InitStream(grpc_stream* gs, grpc_stream_refcount* refcount,
const void* server_data, grpc_core::Arena* arena) override;
Expand Down
2 changes: 0 additions & 2 deletions src/core/ext/transport/inproc/inproc_transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class InprocServerTransport final : public ServerTransport {
Crash("set_accept_stream not supported on inproc transport");
}
}
grpc_endpoint* GetEndpoint() override { return nullptr; }

void Disconnect(absl::Status error) {
if (disconnecting_.exchange(true, std::memory_order_relaxed)) return;
Expand Down Expand Up @@ -162,7 +161,6 @@ class InprocClientTransport final : public ClientTransport {
void SetPollset(grpc_stream*, grpc_pollset*) override {}
void SetPollsetSet(grpc_stream*, grpc_pollset_set*) override {}
void PerformOp(grpc_transport_op*) override { Crash("unimplemented"); }
grpc_endpoint* GetEndpoint() override { return nullptr; }

private:
~InprocClientTransport() override {
Expand Down
3 changes: 0 additions & 3 deletions src/core/ext/transport/inproc/legacy_inproc_transport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ struct inproc_transport final : public grpc_core::FilterStackTransport {
void SetPollsetSet(grpc_stream* stream,
grpc_pollset_set* pollset_set) override;
void PerformOp(grpc_transport_op* op) override;
grpc_endpoint* GetEndpoint() override;

size_t SizeOfStream() const override;
bool HackyDisableStreamOpBatchCoalescingInConnectedChannel() const override {
Expand Down Expand Up @@ -1214,8 +1213,6 @@ void inproc_transport::SetPollsetSet(grpc_stream* /*gs*/,
// Nothing to do here
}

grpc_endpoint* inproc_transport::GetEndpoint() { return nullptr; }

//******************************************************************************
// Main inproc transport functions
//
Expand Down
3 changes: 0 additions & 3 deletions src/core/lib/transport/transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,6 @@ class Transport : public InternallyRefCounted<Transport> {
op->disconnect_with_error = error;
PerformOp(op);
}

// implementation of grpc_transport_get_endpoint
virtual grpc_endpoint* GetEndpoint() = 0;
};

class FilterStackTransport : public Transport {
Expand Down
1 change: 0 additions & 1 deletion test/core/channel/minimal_stack_is_minimal_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ class FakeTransport final : public grpc_core::Transport {
void SetPollset(grpc_stream*, grpc_pollset*) override {}
void SetPollsetSet(grpc_stream*, grpc_pollset_set*) override {}
void PerformOp(grpc_transport_op*) override {}
grpc_endpoint* GetEndpoint() override { return nullptr; }
void Orphan() override {}

private:
Expand Down
1 change: 0 additions & 1 deletion test/core/server/xds_channel_stack_modifier_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ class FakeTransport final : public Transport {
void SetPollset(grpc_stream*, grpc_pollset*) override {}
void SetPollsetSet(grpc_stream*, grpc_pollset_set*) override {}
void PerformOp(grpc_transport_op*) override {}
grpc_endpoint* GetEndpoint() override { return nullptr; }
void Orphan() override {}
};
} // namespace
Expand Down

0 comments on commit 0874aa1

Please sign in to comment.