[Task]: Add go Context.context to NeedsMoreRequestData function
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Please select the area the issue is related to
Area/Gateway (Routing, API deployment in gateway etc.)
Please select the aspect the issue is related to
Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)
Description
The existing function
type StreamingRequestPolicy interface {
RequestPolicy
OnRequestBodyChunk(ctx context.Context, reqCtx *RequestStreamContext, chunk *StreamBody, params map[string]interface{}) StreamingRequestAction
NeedsMoreRequestData(accumulated []byte) bool
}
Proposed one.
type StreamingRequestPolicy interface {
RequestPolicy
OnRequestBodyChunk(ctx context.Context, reqCtx *RequestStreamContext, chunk *StreamBody, params map[string]interface{}) StreamingRequestAction
NeedsMoreRequestData(ctx context.Context, reqCtx *RequestStreamContext, chunk *StreamBody, params map[string]interface{}) bool
}
This is a breaking change; older policies won't work in the new gateway, and new policies won't work on GW v1.0.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search for StreamingRequestPolicy and all uses of NeedsMoreRequestData to map the interface, implementations, and gateway callers. Review how the current accumulated request data is passed, then update the affected contract consistently with the proposed context, request context, chunk, and params arguments. Done means the gateway builds with the new interface and the documented breaking compatibility is accounted for.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend-api-design
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100