All Projects → grpc-ecosystem → Go Grpc Middleware

grpc-ecosystem / Go Grpc Middleware

Licence: apache-2.0
Golang gRPC Middlewares: interceptor chaining, auth, logging, retries and more.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Go Grpc Middleware

Grpc Tools
A suite of gRPC debugging tools. Like Fiddler/Charles but for gRPC.
Stars: ✭ 881 (-78.87%)
Mutual labels:  grpc, middleware, interceptor
Auth
Authenticator via oauth2
Stars: ✭ 118 (-97.17%)
Mutual labels:  middleware, library, authentication
Dotnet Etcd
A C# .NET (dotnet) GRPC client for etcd v3 +
Stars: ✭ 157 (-96.24%)
Mutual labels:  grpc, library
Kratos
A modular-designed and easy-to-use microservices framework in Go.
Stars: ✭ 15,844 (+279.95%)
Mutual labels:  grpc, library
Home
Project Glimpse: Node Edition - Spend less time debugging and more time developing.
Stars: ✭ 260 (-93.76%)
Mutual labels:  middleware, logging
Charon
Authorization and authentication service.
Stars: ✭ 79 (-98.11%)
Mutual labels:  grpc, authentication
Plasma
universal server push middleware by using gRPC stream and Server Sent Events(SSE)
Stars: ✭ 151 (-96.38%)
Mutual labels:  grpc, middleware
DotNETCarRental
Daily car rental simulation with ASP.NET.
Stars: ✭ 13 (-99.69%)
Mutual labels:  middleware, interceptor
Condor Framework
Framework for building GRPC services in Node JS. Include middleware, and more.
Stars: ✭ 52 (-98.75%)
Mutual labels:  grpc, middleware
Simple Php Router
Simple, fast and yet powerful PHP router that is easy to get integrated and in any project. Heavily inspired by the way Laravel handles routing, with both simplicity and expand-ability in mind.
Stars: ✭ 279 (-93.31%)
Mutual labels:  middleware, library
Turbo
A lightweight microservice tool, turn your grpc|thrift APIs into HTTP APIs!
Stars: ✭ 275 (-93.41%)
Mutual labels:  grpc, interceptor
Yoyogo
🦄🌈 YoyoGo is a simple, light and fast , dependency injection based micro-service framework written in Go. Support Nacos ,Consoul ,Etcd ,Eureka ,kubernetes.
Stars: ✭ 277 (-93.36%)
Mutual labels:  grpc, middleware
Koatty
Koa2 + Typescript = Koatty. Use Typescript's decorator implement IOC and AOP.
Stars: ✭ 67 (-98.39%)
Mutual labels:  grpc, middleware
Thingsboard
Open-source IoT Platform - Device management, data collection, processing and visualization.
Stars: ✭ 10,526 (+152.42%)
Mutual labels:  grpc, middleware
Ginrpc
gin auto binding,grpc, and annotated route,gin 注解路由, grpc,自动参数绑定工具
Stars: ✭ 157 (-96.24%)
Mutual labels:  grpc, middleware
Grpc Auth Example
Examples of client authentication with gRPC
Stars: ✭ 65 (-98.44%)
Mutual labels:  grpc, authentication
grpc-jwt-spring-boot-starter
Spring boot starter for gRPC framework with JWT authorization
Stars: ✭ 24 (-99.42%)
Mutual labels:  grpc, interceptor
Muuntaja
Clojure library for fast http api format negotiation, encoding and decoding.
Stars: ✭ 304 (-92.71%)
Mutual labels:  middleware, interceptor
Go Grpc Prometheus
Prometheus monitoring for your gRPC Go servers.
Stars: ✭ 965 (-76.86%)
Mutual labels:  grpc, interceptor
Pygogo
A Python logging library with superpowers
Stars: ✭ 265 (-93.65%)
Mutual labels:  library, logging

Go gRPC Middleware

Travis Build Go Report Card GoDoc SourceGraph codecov Apache 2.0 License quality: production Slack

gRPC Go Middleware: interceptors, helpers, utilities.

Middleware

gRPC Go recently acquired support for Interceptors, i.e. middleware that is executed either on the gRPC Server before the request is passed onto the user's application logic, or on the gRPC client around the user call. It is a perfect way to implement common patterns: auth, logging, message, validation, retries, or monitoring.

These are generic building blocks that make it easy to build multiple microservices easily. The purpose of this repository is to act as a go-to point for such reusable functionality. It contains some of them itself, but also will link to useful external repos.

grpc_middleware itself provides support for chaining interceptors, here's an example:

import "github.com/grpc-ecosystem/go-grpc-middleware"

myServer := grpc.NewServer(
    grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
        grpc_ctxtags.StreamServerInterceptor(),
        grpc_opentracing.StreamServerInterceptor(),
        grpc_prometheus.StreamServerInterceptor,
        grpc_zap.StreamServerInterceptor(zapLogger),
        grpc_auth.StreamServerInterceptor(myAuthFunction),
        grpc_recovery.StreamServerInterceptor(),
    )),
    grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
        grpc_ctxtags.UnaryServerInterceptor(),
        grpc_opentracing.UnaryServerInterceptor(),
        grpc_prometheus.UnaryServerInterceptor,
        grpc_zap.UnaryServerInterceptor(zapLogger),
        grpc_auth.UnaryServerInterceptor(myAuthFunction),
        grpc_recovery.UnaryServerInterceptor(),
    )),
)

Interceptors

Please send a PR to add new interceptors or middleware to this list

Auth

  • grpc_auth - a customizable (via AuthFunc) piece of auth middleware

Logging

  • grpc_ctxtags - a library that adds a Tag map to context, with data populated from request body
  • grpc_zap - integration of zap logging library into gRPC handlers.
  • grpc_logrus - integration of logrus logging library into gRPC handlers.
  • grpc_kit - integration of go-kit/log logging library into gRPC handlers.
  • grpc_grpc_logsettable - a wrapper around grpclog.LoggerV2 that allows to replace loggers in runtime (thread-safe).

Monitoring

Client

  • grpc_retry - a generic gRPC response code retry mechanism, client-side middleware

Server

Status

This code has been running in production since May 2016 as the basis of the gRPC microservices stack at Improbable.

Additional tooling will be added, and contributions are welcome.

License

go-grpc-middleware is released under the Apache 2.0 license. See the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].