Comments (4)
No we don't have one yet. We can add that.
from wasm-extensions.
@bianpengyuan yeah that would be great to have. I have a native C++ filter and I'm trying to re-implement it in WASM , so I don't have to build it everytime with bazel. I have some question regarding the grpc streaming APIs in proxy_wasm_api.h
. Can I ask it here if you won't mind ?
from wasm-extensions.
I've never tried the gRPC stream API, so not sure how much I can help.
Meanwhile, I don't think bazel is quite avoidable when you write Wasm module with C++. Especially when you use protobuf / gRPC. Although Bazel based build for C++ Wasm extension is way easier than native Envoy filter.
from wasm-extensions.
@bianpengyuan yeah that's true. I just want to avoid the native envoy build. I actually want to have both native and WASM filters, so it's more flexible to have options. I'll just describe my question below, if you are familiar with it you can answer. So my filter needs to use the gRPC bidi streams to communicate with an external service. I want to create a stream per every filter object and use the stream to send data to the external service.
The WASM api has this following method will creates a stream and delegates the stream management to the GrpcStreamHanlder
class.
WasmResult grpcStreamHandler(std::string_view service, std::string_view service_name,
std::string_view method_name,
const HeaderStringPairs &initial_metadata,
std::unique_ptr<GrpcStreamHandlerBase> handler);
So we have to implement that class like ExampleGrpcStreamHanlder: public GrpcStreamHanlder<Request,Response>
and implement relevant methods like onResponse()
, onRemoteClose()
. And if I want to send a message to the external service, I have to call the send()
method in GrpcStreamHanlder
. To call it from my filter I need to have some reference to GrpcStreamHanlder. In the C++ native filter, I pass the grpc client to the filter constructor. Here I'm not sure where I should pass that reference. Sorry if what i'm saying is not clear to you.
from wasm-extensions.
Related Issues (20)
- Add guide on how to build a Wasm extension HOT 1
- Add a telemetry extension
- Add JWT header mutation Wasm extension HOT 4
- Publish precompiled Wasm modules
- Verify C++ Wasm extension walkthrough guide HOT 2
- Add a helper script to generate proxy sdk http_archive based on Istio version
- Support basicAuth per hostname HOT 1
- How to get upstream ip address from a WASM filter
- Build a Wasm Extension with C++ is always failed HOT 4
- Create example of Wasm Singleton HOT 1
- Package built binary as OCI images, push to GitHub Container Registry HOT 4
- Issue with grpc_logging example HOT 2
- Help required for deploying basic auth wasm extension HOT 2
- grpc_logging example get request body HOT 2
- How to reference Kubernetes secrets in WasmPlugins?
- Can basic_auth wasm only be used with gateway resources?
- Use WasmPlugin in examples HOT 1
- Is there a problem with the attributegen match logic?
- Add wasm-oidc-plugin HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasm-extensions.