-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ext proc http functionality support (#35740)
Risk Level: low Testing: n/a Docs Changes: n/a Release Notes: inline Fixes: Description: This is to address the issue: #35488, i.e, integrate the ext_proc HTTP client to ext_proc filter. With this PR, the basic functionalities to have Envoy ext_proc filter talk to a HTTP server using HTTP messages are accomplished. This is the follow up of PR: #35676 --------- Signed-off-by: Yanjun Xiang <[email protected]>
- Loading branch information
1 parent
8772930
commit a3e32c9
Showing
25 changed files
with
1,077 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
|
||
#include "envoy/service/ext_proc/v3/external_processor.pb.h" | ||
|
||
namespace Envoy { | ||
namespace Extensions { | ||
namespace HttpFilters { | ||
namespace ExternalProcessing { | ||
|
||
/** | ||
* Async callbacks used during external processing. | ||
*/ | ||
class RequestCallbacks { | ||
public: | ||
virtual ~RequestCallbacks() = default; | ||
virtual void onComplete(envoy::service::ext_proc::v3::ProcessingResponse& response) PURE; | ||
virtual void onError() PURE; | ||
}; | ||
|
||
/** | ||
* Stream base class used during external processing. | ||
*/ | ||
class StreamBase { | ||
public: | ||
virtual ~StreamBase() = default; | ||
}; | ||
|
||
/** | ||
* Async client base class used during external processing. | ||
*/ | ||
class ClientBase { | ||
public: | ||
virtual ~ClientBase() = default; | ||
virtual void sendRequest(envoy::service::ext_proc::v3::ProcessingRequest&& request, | ||
bool end_stream, const uint64_t stream_id, RequestCallbacks* callbacks, | ||
StreamBase* stream) PURE; | ||
virtual void cancel() PURE; | ||
}; | ||
|
||
using ClientBasePtr = std::unique_ptr<ClientBase>; | ||
|
||
} // namespace ExternalProcessing | ||
} // namespace HttpFilters | ||
} // namespace Extensions | ||
} // namespace Envoy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.