🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

mfycheng.dev/grpc-over-http

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mfycheng.dev/grpc-over-http

Go Modules
Version
v0.2.0
Version published
Created
Source

grpc-over-http Documentation

gRPC over http is a very simple proxy that simply forwards HTTP/1.1 and Websocket requests to a gRPC server. Unlike some of the bigger frameworks out there (notably grpc-gateway), grpc-over-http doesn't offer any types of transforms or path remapping, it simply forwards raw protobufs to the gRPC server.

It is expected to be run in the same process as gRPC, to avoid having to change run any additional infrastructure, or have modifications to any of the proto definitions.

Motivation

The primary motivation of grpc-over-http is for environments or setups where HTTP/2 or gRPC libraries are not fully supported. Some examples include nlegacy Load Balancers, or some multi-platform client libraries.

Protocol

The path for both unary and streaming requests are: /api/<service>/<Method>

Unary Requests

Unary requests

  • Method: POST
  • Content-type: application/protobuf
  • Body: <raw-proto-bytes>

Streaming Requests (client, server, or bidirectional)

Streaming requests use websockets, where the payloads in both directions are binary messages, containing the raw proto payload.

FAQs

Package last updated on 23 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts