Documentation ¶
Index ¶
- Constants
- func GRPCClientConnectionBuilder(deps grpcClientConnectionBuilderDeps) clientInt.GRPCClientConnectionBuilder
- func HTTPClientBuilder(deps httpClientBuilderDeps) clientInt.NewHTTPClientBuilder
- func HTTPServerBuilder(deps httpServerDeps) serverInt.GRPCWebServiceBuilder
- type HTTPHandlerFuncPatternPair
- type HTTPHandlerPatternPair
Constants ¶
const ( // FxGroupRESTClientInterceptors defines group name FxGroupRESTClientInterceptors = "restClientInterceptors" // FxGroupGRPCUnaryClientInterceptors defines group name FxGroupGRPCUnaryClientInterceptors = "grpcUnaryClientInterceptors" )
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" // FxGroupUnaryServerInterceptors defines group name FxGroupUnaryServerInterceptors = "unaryServerInterceptors" // FxGroupInternalHTTPHandlers defines group name FxGroupInternalHTTPHandlers = "internalHttpHandlers" // FxGroupInternalHTTPHandlerFunctions defines group name FxGroupInternalHTTPHandlerFunctions = "internalHttpHandlerFunctions" )
Group order is not guaranteed, if it's important then add them manually
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 ¶
HTTPHandlerPatternPair defines pattern -> handler pair