convert

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// EOFMessage is the EOF message websockets must send to imitate gRPC CloseSend()
	EOFMessage = "EOF"
)

Variables

This section is empty.

Functions

func GRPCStatusToHTTPStatusCode

func GRPCStatusToHTTPStatusCode(grpcStatus codes.Code) (c int)

GRPCStatusToHTTPStatusCode converts a GRPC status to an HTTP Status Code

func MethodFromString

func MethodFromString(methodString string) httpapi.Method

MethodFromString converts a method string to a httpapi.Method

func ProxyRequest

func ProxyRequest(ctx context.Context, w http.ResponseWriter, r *http.Request, procedure string, conn grpc.ClientConnInterface, txid string, loggers ...logs.Writer)

ProxyRequest proxies an HTTP(S) or WS(S) request through a GRPC connection compliant with httpgrpc/httpapi

func RequestFromRequest

func RequestFromRequest(r *http.Request) *httpapi.Request

RequestFromRequest creates a *httpapi.Request from *http.Request filling all values except body, which could error

Types

This section is empty.

Jump to

Keyboard shortcuts

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