From 0d2f4c326b28a1697bdef433748092460a762930 Mon Sep 17 00:00:00 2001 From: Rohan Verma Date: Tue, 22 Jun 2021 12:06:25 +0530 Subject: [PATCH] chore: update README --- README.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f228ebc..a530db3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,24 @@ # fastglue -Fastglue is a "glue" wrapper over [fasthttp](https://github.com/valyala/fasthttp) and [fasthttprouter](https://github.com/fasthttp/router). - -Currently, fastglue is successfully used at [Zerodha](https://zerodha.com) in production serving millions of requests per second. +## Overview [![Go Reference](https://pkg.go.dev/badge/github.com/zerodha/fastglue.svg)](https://pkg.go.dev/github.com/zerodha/fastglue) [![Zerodha Tech](https://zerodha.tech/static/images/github-badge.svg)](https://zerodha.tech) + +fastglue is an opinionated, bare bones wrapper that glues together [fasthttp](https://github.com/valyala/fasthttp) +and [fasthttprouter](https://github.com/fasthttp/router) 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