partial

package
v2.0.0-...-571da87 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FxGroupRESTClientInterceptors defines group name
	FxGroupRESTClientInterceptors = "restClientInterceptors"
	// FxGroupGRPCUnaryClientInterceptors defines group name
	FxGroupGRPCUnaryClientInterceptors = "grpcUnaryClientInterceptors"
)
View Source
const (
	// FxGroupGRPCServerAPIs defines group name
	FxGroupGRPCServerAPIs = "grpcServerAPIs"
	// FxGroupGRPCGatewayGeneratedHandlers defines group name
	FxGroupGRPCGatewayGeneratedHandlers = "grpcGatewayGeneratedHandlers"
	// FxGroupGRPCGatewayMuxOptions defines group name
	FxGroupGRPCGatewayMuxOptions = "grpcGatewayMuxOptions"
	// FxGroupExternalHTTPHandlers defines group name
	FxGroupExternalHTTPHandlers = "externalHttpHandlers"
	// FxGroupExternalHTTPHandlerFunctions defines group name
	FxGroupExternalHTTPHandlerFunctions = "externalHttpHandlerFunctions"
	// FxGroupExternalHTTPInterceptors defines group name
	FxGroupExternalHTTPInterceptors = "externalHttpInterceptors"
	// FxGroupUnaryServerInterceptors defines group name
	FxGroupUnaryServerInterceptors = "unaryServerInterceptors"
	// FxGroupInternalHTTPHandlers defines group name
	FxGroupInternalHTTPHandlers = "internalHttpHandlers"
	// FxGroupInternalHTTPHandlerFunctions defines group name
	FxGroupInternalHTTPHandlerFunctions = "internalHttpHandlerFunctions"
	// FxGroupInternalHTTPInterceptors defines group name
	FxGroupInternalHTTPInterceptors = "internalHttpInterceptors"
)

Group order is not guaranteed, if it's important then add them manually

View Source
const PanicHandlerCounter = "panic_handler_total"

PanicHandlerCounter is the metric name to count all recovered panics

Variables

This section is empty.

Functions

func GRPCClientConnectionBuilder

func GRPCClientConnectionBuilder(deps grpcClientConnectionBuilderDeps) clientInt.GRPCClientConnectionBuilder

GRPCClientConnectionBuilder creates an injectable grpc.ClientConn that can be predefined with Interceptors or/and additional options later

func HTTPClientBuilder

func HTTPClientBuilder(deps httpClientBuilderDeps) clientInt.NewHTTPClientBuilder

HTTPClientBuilder creates an injectable http.Client builder that can be predefined with Interceptors

This function returns a closure that will always create a new builder. That way every usage can add different interceptors without influencing others

func HTTPServerBuilder

func HTTPServerBuilder(deps httpServerDeps) serverInt.GRPCWebServiceBuilder

HTTPServerBuilder true to it's name, it is partially initialized builder.

It uses some default assumptions and configurations, which are mostly good. However, if you need to customize your configuration it's better to build yours from scratch

Types

type HTTPHandlerFuncPatternPair

type HTTPHandlerFuncPatternPair struct {
	Pattern     string
	HandlerFunc http.HandlerFunc
}

HTTPHandlerFuncPatternPair defines patter -> handler func pair

type HTTPHandlerPatternPair

type HTTPHandlerPatternPair struct {
	Pattern string
	Handler http.Handler
}

HTTPHandlerPatternPair defines pattern -> handler pair

Jump to

Keyboard shortcuts

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