grpc

package
v0.13.16 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SwaggerFS embed.FS

Functions

func AsStatusError added in v0.13.0

func AsStatusError(err error) error

func NewGatewayService added in v0.13.0

func NewGatewayService(
	name string,
	port, offset int,
	routes gin.IRoutes,
	paths []string,
	initHandlers func(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error,
) *gatewayService

func NewGrpcService added in v0.13.0

func NewGrpcService(
	port, offset int,
	opts []grpc.ServerOption,
	faults *faults.Set,
	initializers ...GrpcInitializer,
) *grpcServer

func StreamFaultInjector added in v0.13.0

func StreamFaultInjector(s *faults.Set) grpc.StreamServerInterceptor

func UnaryFaultInjector added in v0.13.0

func UnaryFaultInjector(s *faults.Set) grpc.UnaryServerInterceptor

func WrapError

func WrapError(err error, format string, args ...interface{}) error

workaround for grpc not supporting error unwrapping. if err seems to be a grpc status error, returns a new error with the same code & details, but a wrapped description. Otherwise wraps err normally. upstream: https://github.com/grpc/grpc-go/issues/2934

Types

type GrpcInitializer added in v0.13.0

type GrpcInitializer func(context.Context, *grpc.Server, *ent.Client) error

Jump to

Keyboard shortcuts

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