grpc

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// The key used to insert the method name of the grpc call into context
	ContextMethodNameKey = "method"
)

Variables

This section is empty.

Functions

func ConvertToGrpcError

func ConvertToGrpcError(ctx context.Context, error *server.Error) error

func CreateConnectionOrDie

func CreateConnectionOrDie(host string, isTLS bool) *grpc.ClientConn

func CreateConnectionWithMaxMsgSizeOrDie

func CreateConnectionWithMaxMsgSizeOrDie(host string, isTLS bool, maxMsgSizeInBytes int) *grpc.ClientConn

func GetAuthBearerTokenFromHeader

func GetAuthBearerTokenFromHeader(ctx context.Context) (string, *server.Error)

func RunServer

func RunServer(grpcPort, grpcWebPort, corsAllowedHosts string, handlers ...RegisterServiceHandler)

func ValidateGrpcRequest

func ValidateGrpcRequest(v validation.Validatable) error

Types

type RegisterServiceHandler

type RegisterServiceHandler func(s *grpc.Server)

Jump to

Keyboard shortcuts

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