Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Circuit breaking the specific requests #436

@tahir-ali-uipath

Description

@tahir-ali-uipath

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions