Giter Site home page Giter Site logo

grpchan's Introduction

gRPC Channels

Build Status Go Report Card GoDoc

This repo provides an abstraction for an RPC connection: the Channel. Implementations of Channel can provide alternate transports -- different from the standard HTTP/2-based transport provided by the google.golang.org/grpc package.

This can be useful for providing new transports, such as HTTP 1.1, web sockets, or (significantly) in-process channels for testing.

This repo also contains two such alternate transports: an HTTP 1.1 implementation of gRPC (which supports all stream kinds other than full-duplex bidi streams) and an in-process transport (which allows a process to dispatch handlers implemented in the same program without needing serialize and de-serialize messages over the loopback network interface).

In order to use channels with your proto-defined gRPC services, you need to use a protoc plugin included in this repo: protoc-gen-grpchan.

go install github.com/solarwinds/grpchan/cmd/protoc-gen-grpchan

You use the plugin via a --grpchan_out parameter to protoc. Specify the same output directory to this parameter as you supply to --go_out. The plugin will then generate *.pb.grpchan.go files, alongside the *.pb.go files. These additional files contain additional methods that let you use the proto-defined service methods with alternate transports.

//go:generate protoc --go_out=plugins=grpc:. --grpchan_out=. my.proto

grpchan's People

Contributors

adamiklukasz avatar dragonsinth avatar jhump avatar lootek avatar mend-for-github-com[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.