rum

module
v0.0.0-...-bfdbfb3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2020 License: Apache-2.0

README

Rum

[WIP]

Rum provides middlewares for Golang http.Client. As it is easy to use http handler(server-side) middlewares with Gin, Rum aims to make using client-side middlewares as easy as Gin when use http.Client.

go.dev reference Go

Install

Requirments

Go version 1.13+

Install
go get github.com/YouEclipse/rum

Quick start




import (
	"net/http"
	"github.com/YouEclipse/rum/pkg/rum"
)

func main() {
	httpClient := http.Client{}
	transport := &rum.Transport{}
	m := NewAuthenticationMiddleware()
	transport.Use(m.BasicAuth)

    httpClient.Transport = transport
    ...
}



Features v0.1.0

built-in middlewares
  • cache
  • mock
  • throttle
  • authentication
  • retry
  • open-tracing

...

License

Apache 2.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL