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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -488,16 +488,16 @@ DEPENDENCY_REPOSITORIES = dict(
use_category = ["test"],
),
proxy_wasm_cpp_sdk = dict(
sha256 = "eba429ae0068508c4c20980803fd20b991c3d5d1604e8ef61ac8cb309e6867ed",
strip_prefix = "proxy-wasm-cpp-sdk-4ee6ace4fe529b9fdbffa76f34eb6deffe72c1a2",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/4ee6ace4fe529b9fdbffa76f34eb6deffe72c1a2.tar.gz"],
sha256 = "e7c4bb34dda50aaf5815c24d76248a5a69d33d81db8e23a927701cbd1ee82791",
strip_prefix = "proxy-wasm-cpp-sdk-9cd9af9d357297f865d3612a722a69c7e1ee1541",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/archive/9cd9af9d357297f865d3612a722a69c7e1ee1541.tar.gz"],
use_category = ["dataplane"],
cpe = "N/A",
),
proxy_wasm_cpp_host = dict(
sha256 = "a93aabeed810ef65078aeb6f10f9594c74ce131a5c1bdb064b1a6e92a36d8b78",
strip_prefix = "proxy-wasm-cpp-host-646d814b32692e2c40a8bd97cd3a100fb97dfb26",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/646d814b32692e2c40a8bd97cd3a100fb97dfb26.tar.gz"],
sha256 = "41c48f430bce1370abc1d0d56b82abeffc59af43309951cbf064a001e689fe19",
strip_prefix = "proxy-wasm-cpp-host-56593833008e677a99b51a78cd480391f298e226",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/56593833008e677a99b51a78cd480391f298e226.tar.gz"],
use_category = ["dataplane"],
cpe = "N/A",
),
Expand Down
13 changes: 6 additions & 7 deletions source/extensions/common/wasm/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class Context : public proxy_wasm::ContextBase,
// General
WasmResult log(uint32_t level, absl::string_view message) override;
uint64_t getCurrentTimeNanoseconds() override;
absl::string_view getConfiguration() override;
std::pair<uint32_t, absl::string_view> getStatus() override;

// State accessors
Expand All @@ -219,6 +220,11 @@ class Context : public proxy_wasm::ContextBase,
WasmResult sendLocalResponse(uint32_t response_code, absl::string_view body_text,
Pairs additional_headers, uint32_t grpc_status,
absl::string_view details) override;
void clearRouteCache() override {
if (decoder_callbacks_) {
decoder_callbacks_->clearRouteCache();
}
}

// Header/Trailer/Metadata Maps
WasmResult addHeaderMapValue(WasmHeaderMapType type, absl::string_view key,
Expand Down Expand Up @@ -310,13 +316,6 @@ class Context : public proxy_wasm::ContextBase,
void addAfterVmCallAction(std::function<void()> f);
void onCloseTCP();

virtual absl::string_view getConfiguration();
virtual void clearRouteCache() {
if (decoder_callbacks_) {
decoder_callbacks_->clearRouteCache();
}
}

struct AsyncClientHandler : public Http::AsyncClient::Callbacks {
// Http::AsyncClient::Callbacks
void onSuccess(const Http::AsyncClient::Request&,
Expand Down
2 changes: 2 additions & 0 deletions test/extensions/common/wasm/test_data/test_cpp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ static float gInfinity = INFINITY;
abort(); \
} while (0)

WASM_EXPORT(void, proxy_abi_version_0_2_0, (void)) {}

WASM_EXPORT(void, proxy_on_context_create, (uint32_t, uint32_t)) {}

WASM_EXPORT(uint32_t, proxy_on_vm_start, (uint32_t context_id, uint32_t configuration_size)) {
Expand Down