Skip to content

Conversation

@knadh
Copy link
Contributor

@knadh knadh commented Jan 31, 2025

  • Break to /v2 to introduce Options{} that's pass to lib init.
  • Add CompressOptions{} to enable zstd|br|gzip|deflate auto-compression support offered by fasthttp.

@knadh knadh requested a review from rhnvrm January 31, 2025 11:43
@knadh knadh force-pushed the v2 branch 2 times, most recently from 9610b3d to 3595bd6 Compare January 31, 2025 11:45
- Break to `/v2` to introduce `Options{}` that's pass to lib init.
- Add `CompressOptions{}` to enable zstd|br|gzip|deflate auto-compression
  support offered by fasthttp.

// If compression is enabled, wrap the handler with fasthttp's CompressHandler
// which automatically handles the compression logic.
if f.opt.CompressionOpt.Enabled {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can rename this to opt.Compression? Type name can remain CompressionOpt.

Router *fasthttprouter.Router
Server *fasthttp.Server
context interface{}
MatchedRoutePathParam string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MatchedRoutePathParam

This is setup in NewGlue in custom.go, maybe it can be an opt since currently we depend on NewGlue()

fastglue.NewGlue() <- Deprecate this since we are doing a v2?


func main() {
f := fastglue.NewGlue()
f := fastglue.NewGlue(fastglue.Options{})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New vs New Glue, its confusing can be deprecated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants