grpc

package module
v0.0.0-...-74f90a1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

krakend-grpc

gRPC adapter for the KrakenD framework

Documentation

Index

Constants

View Source
const (
	Namespace      = "github.com/devopsfaith/krakend-grpc"
	EncodingPrefix = "grpc-"
)

Variables

This section is empty.

Functions

func NewGRPCProxy

NewGRPCProxy is a proxy.BackendFactory for consuming gRPC services

func RegisterClient

func RegisterClient(
	name string,
	enc func(context.Context, interface{}) (request interface{}, err error),
	dec func(context.Context, interface{}) (request interface{}, err error),
	t interface{},
)

Types

type RequestWrapper

type RequestWrapper interface {
	Params() map[string]string
	Header() map[string][]string
	Body() io.Reader
}

type ResponseWrapper

type ResponseWrapper interface {
	Data() map[string]interface{}
	Header() map[string][]string
}

Directories

Path Synopsis
example
pb

Jump to

Keyboard shortcuts

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