zerodha/fastglue

Fastglue is an opinionated, bare bones wrapper that glues together fasthttp and fasthttprouter to act as a micro HTTP framework.

Go

95

117 commits

updated Jan 31, 2025

See the code

README

fastglue

Overview Go Reference Zerodha Tech

fastglue is an opinionated, bare bones wrapper that glues together fasthttp and fasthttprouter to act as a micro HTTP framework. It helps eliminate boilerplate that would otherwise be required when using these two libraries to write HTTP servers. It enables:

  • Performance benefits of fasthttp + fasthttprouter.
  • Pre/post middleware hooks on HTTP handlers.
  • Simple middlewares for validating (existence, length range) of params in HTTP requests.
  • Functions for unmarshalling request payloads (Form encoding, JSON, XML) into arbitrary structs.
  • Shortcut functions for registering handlers, GET(), POST() etc.
  • Shortcut for fasthttp listening on TCP and Unix sockets.
  • Shortcut for graceful shutdown hook on the fasthttp server.
  • Opinionated JSON API response and error structures.
  • Shortcut functions for sending strings, bytes, JSON in the envelope structure without serialization or allocation.

Install

go get -u github.com/zerodha/fastglue

Usage

import "github.com/zerodha/fastglue"

Examples

fastglue
fasthttp
fasthttprouter
golang
http-framework
http-server
microframework
performance
routing

zerodha/fastglue

Fastglue is an opinionated, bare bones wrapper that glues together fasthttp and fasthttprouter to act as a micro HTTP framework.

Go

95

117 commits

updated Jan 31, 2025

See the code

README

fastglue

Overview Go Reference Zerodha Tech

fastglue is an opinionated, bare bones wrapper that glues together fasthttp and fasthttprouter to act as a micro HTTP framework. It helps eliminate boilerplate that would otherwise be required when using these two libraries to write HTTP servers. It enables:

  • Performance benefits of fasthttp + fasthttprouter.
  • Pre/post middleware hooks on HTTP handlers.
  • Simple middlewares for validating (existence, length range) of params in HTTP requests.
  • Functions for unmarshalling request payloads (Form encoding, JSON, XML) into arbitrary structs.
  • Shortcut functions for registering handlers, GET(), POST() etc.
  • Shortcut for fasthttp listening on TCP and Unix sockets.
  • Shortcut for graceful shutdown hook on the fasthttp server.
  • Opinionated JSON API response and error structures.
  • Shortcut functions for sending strings, bytes, JSON in the envelope structure without serialization or allocation.

Install

go get -u github.com/zerodha/fastglue

Usage

import "github.com/zerodha/fastglue"

Examples

fastglue
fasthttp
fasthttprouter
golang
http-framework
http-server
microframework
performance
routing

Project health

Overall

3.5/10

Maintained

0/10

Code review

4/10
OpenSSF Scorecard

Latest release

v1.8.1 · Jul 2, 2024

Releases this year

0

Significant stargazers

Aliaksandr Valialkin

3,932 followers · starred Jun 2021