/gohaltlib

Gohaltlib 👮‍♀🔧: Gohalt 3rd Party Integrations library

Primary LanguageGoMIT LicenseMIT

gohalt

Gohaltlib 👮‍♀🔧: Gohalt 3rd Party Integrations library

lint test report version license godoc

go get -u github.com/1pkg/gohalt go get -u github.com/1pkg/gohaltlib

Note: in gohalt v0.3.0 all integrations were moved to separate gohaltlib repository to make base gohalt repository dependencies footprint small.

Introduction

Gohalt is simple and convenient yet powerful and efficient throttling go library. Gohalt provides various throttlers and surronding tools to build throttling pipelines and rate limiters of any complexity adjusted to your specific needs. Gohalt provides an easy way to integrate throttling and rate limiting with your infrastructure through built in middlewares.

Integrations

Library Adapter
gin func NewMiddlewareGin(thr Throttler, with GinWith, on GinOn) gin.HandlerFunc
stdlib http handler func NewMiddlewareStd(h http.Handler, thr Throttler, with StdWith, on StdOn) http.Handler
echo func NewMiddlewareEcho(thr Throttler, with EchoWith, on EchoOn) echo.MiddlewareFunc
beego func NewMiddlewareBeego(thr Throttler, with BeegoWith, on BeegoOn) beego.FilterFunc
kit func NewMiddlewareKit(thr Throttler, with KitWith, on KitOn) endpoint.Middleware
mux func NewMiddlewareMux(h http.Handler, thr Throttler, with MuxWith, on MuxOn) http.Handler
httprouter func NewMiddlewareRouter(h http.Handler, thr Throttler, with RouterWith, on RouterOn) http.Handler
reveal func NewMiddlewareRevel(thr Throttler, with RevealWith, on RevealOn) revel.Filter
iris func NewMiddlewareIris(thr Throttler, with IrisWith, on IrisOn) iris.Handler
fasthttp func NewMiddlewareFast(h fasthttp.RequestHandler, thr Throttler, with FastWith, on FastOn) fasthttp.RequestHandler
stdlib rt func NewRoundTripperStd(rt http.RoundTripper, thr Throttler, with RoundTripperStdWith, on RoundTripperStdOn) http.RoundTripper
fasthttp rt func NewRoundTripperFast(rt RoundTripperFast, thr Throttler, with RoundTripperFastWith, on RoundTripperFastOn) RoundTripperFast
stdlib rpc client coded func NewRPCClientCodec(cc rpc.ClientCodec, thr Throttler, with RPCCodecWith, on RPCCodecOn) rpc.ClientCodec
stdlib rpc server coded func NewRPCServerCodec(sc rpc.ServerCodec, thr Throttler, with RPCCodecWith, on RPCCodecOn) rpc.ServerCodec
grpc client stream func NewGRPCClientStream(cs grpc.ClientStream, thr Throttler, with GRPCStreamWith, on GRPCStreamOn) grpc.ClientStream
grpc server stream func NewGrpServerStream(ss grpc.ServerStream, thr Throttler, with GRPCStreamWith, on GRPCStreamOn) grpc.ServerStream
go-micro client func NewMicroClient(thr Throttler, with MicroClientWith, on MicroOn) client.Wrapper
go-micro server func NewMicroHandler(thr Throttler, with MicroServerWith, on MicroOn) server.HandlerWrapper
stdlib net conn func NewNetConn(conn net.Conn, thr Throttler, with NetConnWith, on NetConnOn, mode NetConnMode) net.Conn
stdlib sql func NewSQLClient(cli SQLClient, thr Throttler, with SQLClientWith, on SQLClientOn) SQLClient
stdlib io reader func NewReader(r io.Reader, thr Throttler, with RWWith, on RWOn) io.Reader
stdlib io writer func NewWriter(w io.Writer, thr Throttler, with RWWith, on RWOn) io.Writer

Licence

Gohaltlib is licensed under the MIT License.
See LICENSE for the full license text.