Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/kataras/muxie

Muxie is a modern, fast and light HTTP multiplexer for Go. Fully compatible with the http.Handler interface. Written for everyone.
https://github.com/kataras/muxie

go golang high-performance iris router trie

Last synced: 11 days ago
JSON representation

Muxie is a modern, fast and light HTTP multiplexer for Go. Fully compatible with the http.Handler interface. Written for everyone.

Lists

README

        

Muxie


:steam_locomotive::train::train::train::train::train:


Fast trie implementation designed from scratch specifically for HTTP


A small and light router for creating sturdy backend Go applications. Production-level tested, muxie's capabilities live inside the well-tested Iris web framework.





Release/stability



Godocs



Build Status



Report Card



Example



Built for Iris


The little router that could. Built with ❤︎ by
Gerasimos Maropoulos

[![Benchmark chart between muxie, httprouter, gin, gorilla mux, echo, vestigo and chi](_benchmarks/chart-17-oct-2018.png)](_benchmarks)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fkataras%2Fmuxie.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fkataras%2Fmuxie?ref=badge_shield)

_Last updated on October 17, 2018._ Click [here](_benchmarks/README.md) to read more details.

## Features

- __trie based:__ [performance](_benchmarks/README.md) and useness are first class citizens, Muxie is based on the prefix tree data structure, designed from scratch and built for HTTP, and it is among the fastest outhere, if not the fastest one
- __grouping:__ group common routes based on their path prefixes
- __no external dependencies:__ weighing `30kb`, Muxie is a tiny little library without external dependencies
- __closest wildcard resolution and prefix-based custom 404:__ wildcards, named parameters and static paths can all live and play together nice and fast in the same path prefix or suffix(!)
- __small api:__ with only 3 main methods for HTTP there's not much to learn
- __compatibility:__ built to be 100% compatible with the `net/http` standard package

## Technical Features

- [x] Closest Wildcard Resolution and Root wildcard (CWR)[*](_examples/3_root_wildcard_and_custom_404/main.go)
- [x] Parameterized Dynamic Path (named parameters with `:name` and wildcards with `*name`, can play all together for the same path prefix|suffix)[*](_examples/2_parameterized/main.go)
- [x] Standard handlers chain (`Pre(handlers).For(mainHandler)` for individual routes and `Mux#Use` for router)[*](_examples/6_middleware/main.go)
- [x] Register handlers by method(s) (`muxie.Methods()`)[*](_examples/7_by_methods/main.go)
- [x] Register handlers by filters (`Mux#HandleRequest` and `Mux#AddRequestHandler` for `muxie.Matcher` and `muxie.RequestHandler`)
- [x] Handle subdomains with ease (`muxie.Host` Matcher)[*](_examples/9_subdomains_and_matchers)
- [x] Request Processors (`muxie.Bind` and `muxie.Dispatch`)[*](_examples/8_bind_req_send_resp)

Interested? Want to learn more about this library? Check out our tiny [examples](_examples) and the simple [godocs page](https://godoc.org/github.com/kataras/muxie).

## Installation

The only requirement is the [Go Programming Language](https://golang.org/dl/)

```sh
$ go get -u github.com/kataras/muxie
```

## License

[MIT](https://tldrlegal.com/license/mit-license)

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fkataras%2Fmuxie.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fkataras%2Fmuxie?ref=badge_large)