proxy-wasm-go-sdk icon indicating copy to clipboard operation
proxy-wasm-go-sdk copied to clipboard

Circuit breaking the specific requests

Open tahir-ali-uipath opened this issue 10 months ago • 0 comments

I am trying to add circuit breaking to specific request. I looked into this example https://github.com/tetratelabs/proxy-wasm-go-sdk/blob/main/examples/postpone_requests/main.go but not clear how to add postpone for specific request

func (ctx *httpContext) OnHttpRequestHeaders(numHeaders int, endOfStream bool) types.Action {
	proxywasm.LogInfof("postpone request with contextID=%d", ctx.contextID)
	ctx.pluginCtx.postponed = append(ctx.pluginCtx.postponed, ctx.contextID)
	return types.ActionPause
}

Describe the bug / error

None

What is your Envoy/Istio version?

client version: 1.18.0
control plane version: 1.18.0
data plane version: 1.18.0 (2 proxies)

What is the SDK version?

github.com/tetratelabs/proxy-wasm-go-sdk v0.21.0

What is your TinyGo version?

tinygo version 0.28.1 darwin/amd64 (using go version go1.20.14 and LLVM version 15.0.0)

URL or snippet of your code including Envoy configuration

Additional context (Optional)

tahir-ali-uipath avatar Apr 13 '24 02:04 tahir-ali-uipath