Documentation ¶
Index ¶
- Variables
- func BuildBricksWebServiceFxOption() fx.Option
- func CopyGRPCHeadersClientInterceptorFxOption() fx.Option
- func CopyGRPCHeadersHTTPClientInterceptorFxOption() fx.Option
- func DumpRESTClientInterceptorFxOption() fx.Option
- func FxEventLoggerOption() fx.Option
- func GRPCGatewayMetadataTraceCarrierFxOption() fx.Option
- func GRPCTracingUnaryServerInterceptorFxOption() fx.Option
- func HTTPClientBuildersFxOption() fx.Option
- func HTTPServerBuilderFxOption() fx.Option
- func InternalDebugHandlersFxOption() fx.Option
- func InternalProfileHandlerFunctionsFxOption() fx.Option
- func InternalSelfHandlersFxOption() fx.Option
- func JWTExtractorFxOption() fx.Option
- func LoggerFxOption() fx.Option
- func LoggerGRPCIncomingContextExtractorFxOption() fx.Option
- func LoggerGRPCInterceptorFxOption() fx.Option
- func MapHTTPHeadersToClientMetadataMuxOptionFxOption() fx.Option
- func MonitorFxOption() fx.Option
- func MonitorGRPCClientCallsInterceptorFxOption() fx.Option
- func MonitorGRPCInterceptorFxOption() fx.Option
- func MonitorRESTClientCallsInterceptorFxOption() fx.Option
- func TracerGRPCClientInterceptorFxOption() fx.Option
- func TracerRESTClientInterceptorFxOption() fx.Option
Constants ¶
This section is empty.
Variables ¶
var BuildBricksWebService = constructors.Service
BuildBricksWebService is a constructor that creates and registers fx.LifeCycle hooks for Bricks web services
Consider using BuildBricksWebServiceFxOption if you only want to invoke it.
var CopyGRPCHeadersClientInterceptor = client.CopyGRPCHeadersClientInterceptor
CopyGRPCHeadersClientInterceptor is a constructor that creates gRPC Unary Client Interceptor
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using CopyGRPCHeadersClientInterceptorFxOption if you only want to provide it.
var CopyGRPCHeadersHTTPClientInterceptor = client.CopyGRPCHeadersHTTPClientInterceptor
CopyGRPCHeadersHTTPClientInterceptor is a constructor that creates REST Client Interceptor
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using CopyGRPCHeadersHTTPClientInterceptorFxOption if you only want to provide it.
var CreateFxEventLogger = logger.CreateFxEventLogger
CreateFxEventLogger is a constuctor that creates a custom fxevent.Logger
Consider using FxEventLoggerOption if you only want to invoke it.
var DefaultLogger = constructors.DefaultLogger
DefaultLogger is a constructor that creates a default log.Logger based on provided log.Builder
Consider using LoggerFxOption if you only want to invoke it.
var DumpRESTClientInterceptor = client.DumpRESTClientInterceptor
DumpRESTClientInterceptor is a constructor that creates REST Client Interceptor
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using DumpRESTClientInterceptorFxOption if you only want to provide it.
var GRPCClientConnectionBuilder = partial.GRPCClientConnectionBuilder
GRPCClientConnectionBuilder is a constructor that creates gRPC Connection for client builder
Consider using HTTPClientBuildersFxOption if you only want to provide it.
var GRPCTracingUnaryServerInterceptor = trace.GRPCTracingUnaryServerInterceptor
GRPCTracingUnaryServerInterceptor is a constructor that creates gRPC Unary Server Interceptor This interceptor will report a server span to the trace server
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using GRPCTracingUnaryServerInterceptorFxOption if you only want to provide it.
var HTTPClientBuilder = partial.HTTPClientBuilder
HTTPClientBuilder is a constructor that creates HTTP Client builder
Consider using HTTPClientBuildersFxOption if you only want to provide it.
var HTTPServerBuilder = partial.HTTPServerBuilder
HTTPServerBuilder is a constructor that creates a partial Brickss HTTP Server Builder
Consider using HTTPServerBuilderFxOption if you only want to provide it.
var InternalDebugHandlers = handlers.InternalDebugHandlers
InternalDebugHandlers is a constructor that creates Internal Debug HTTP Handlers
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using InternalDebugHandlersFxOption if you only want to provide it.
var InternalProfileHandlerFunctions = handlers.InternalProfileHandlerFunctions
InternalProfileHandlerFunctions is a constructor that creates Internal Profile HTTP Handlers
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using InternalProfileHandlerFunctionsFxOption if you only want to provide it.
var JWTExtractor = constructors.DefaultJWTTokenExtractor
JWTExtractor is a constructor for Default JWT Token Extractor
Consider using JWTExtractorFxOption if you only want to provide it.
var LoggerGRPCIncomingContextExtractor = context.LoggerGRPCIncomingContextExtractor
LoggerGRPCIncomingContextExtractor is a constructor that creates log.ContextExtractor. This Extractor will then extract selected key:value pairs from the context when writing log
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using LoggerGRPCIncomingContextExtractorFxOption if you only want to provide it.
var LoggerGRPCInterceptor = server.LoggerGRPCInterceptor
LoggerGRPCInterceptor is a constructor that creates gRPC Unary Server Interceptor. This Interceptor will log gRPC calls with request and response if enabled.
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using LoggerGRPCInterceptorFxOption if you only want to provide it.
var MapHTTPHeadersToClientMetadataMuxOption = grpcgateway.MapHTTPHeadersToClientMetadataMuxOption
MapHTTPHeadersToClientMetadataMuxOption is a Grpc Gateway server mux option that maps incoming HTTP Headers to gRPC Context by checking if they match a list of prefixes. List of prefixes is controlled by config key: `bricks.middleware.map.httpHeaders`
Consider using MapHTTPHeadersToClientMetadataMuxOptionFxOption if you only want to provide it.
var MetadataTraceCarrierOption = server.MetadataTraceCarrierOption
MetadataTraceCarrierOption creates a special metadata.MD carrier for the tracer. Make sure to understand what it does by reading server.MetadataTraceCarrierOption code and explanation
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using GRPCGatewayMetadataTraceCarrierFxOption if you only want to provide it.
var MonitorGRPCClientCallsInterceptor = client.MonitorGRPCClientCallsInterceptor
MonitorGRPCClientCallsInterceptor is a constructor that creates Unary gRPC Client Interceptor
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using MonitorGRPCClientCallsInterceptorFxOption if you only want to provide it.
var MonitorRESTClientCallsInterceptor = client.MonitorRESTClientCallsInterceptor
MonitorRESTClientCallsInterceptor is a constructor that creates REST Client Interceptor
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using MonitorRESTClientCallsInterceptorFxOption if you only want to provide it.
var SelfHandlers = handlers.SelfHandlers
SelfHandlers is a constructor that creates Internal Self HTTP Handlers
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Adds these endpoint on Internal web service
- /self/build
- /self/config
Consider using InternalSelfHandlersFxOption if you only want to provide it.
var TracerGRPCClientInterceptor = trace.TracerGRPCClientInterceptor
TracerGRPCClientInterceptor is a constructor that creates gRPC Unary Client Interceptor This interceptor will report a client span to the trace server
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using TracerGRPCClientInterceptorFxOption if you only want to provide it.
var TracerRESTClientInterceptor = trace.TracerRESTClientInterceptor
TracerRESTClientInterceptor is a constructor that creates REST HTTP Client Interceptor This interceptor will report a client span to the trace server
*Note* normally this dependency is part of a group. If you want to create it as a standalone dependency, remember that there can be only one of this kind in the graph.
Consider using TracerRESTClientInterceptorFxOption if you only want to provide it.
Functions ¶
func BuildBricksWebServiceFxOption ¶
BuildBricksWebServiceFxOption creates the entire dependency graph and registers all provided fx.LifeCycle hooks
func CopyGRPCHeadersClientInterceptorFxOption ¶
CopyGRPCHeadersClientInterceptorFxOption adds grpc Client Interceptor that copies values from grpc Incoming to Outgoing metadata
func CopyGRPCHeadersHTTPClientInterceptorFxOption ¶
CopyGRPCHeadersHTTPClientInterceptorFxOption copies filtered Headers found in the Incoming GRPC metadata.MD to the Outgoing HTTP Request Headers.
This is useful if you want to propagate them to the next service when using `http.Client`
For Example: "authorization" header containing user token
func DumpRESTClientInterceptorFxOption ¶
DumpRESTClientInterceptorFxOption usefull when you want to log what is actually sent to the external HTTP server and what was returned.
func FxEventLoggerOption ¶
FxEventLoggerOption add new Fx Event option to output fx events using structured logger
func GRPCGatewayMetadataTraceCarrierFxOption ¶
GRPCGatewayMetadataTraceCarrierFxOption adds GRPCGatewayMuxOption that will inject trace into the context.Context Make sure to understand what it does by reading server.MetadataTraceCarrierOption code and explanation
func GRPCTracingUnaryServerInterceptorFxOption ¶
GRPCTracingUnaryServerInterceptorFxOption adds grpc trace unary server interceptor to the graph
func HTTPClientBuildersFxOption ¶
HTTPClientBuildersFxOption adds both (GRPC, REST) partial http clients to the graph
func HTTPServerBuilderFxOption ¶
HTTPServerBuilderFxOption adds Default Http Server builder which later injected to the Service Invoke option by calling BuildBricksWebServiceFxOption fx.Invoke option to the graph
func InternalDebugHandlersFxOption ¶
InternalDebugHandlersFxOption adds Internal Debug Handlers to the graph
func InternalProfileHandlerFunctionsFxOption ¶
InternalProfileHandlerFunctionsFxOption adds Internal Profiler Handler to the graph
func InternalSelfHandlersFxOption ¶
InternalSelfHandlersFxOption adds Internal Self Build and Config information HTTP Handlers to the graph
Adds these endpoint on Internal web service
- /self/build
- /self/config
func JWTExtractorFxOption ¶
JWTExtractorFxOption adds default JWT extractor from context.Context to the graph
func LoggerFxOption ¶
LoggerFxOption adds Default Logger to the graph
func LoggerGRPCIncomingContextExtractorFxOption ¶
LoggerGRPCIncomingContextExtractorFxOption adds Logger Context Extractor using values within incoming grpc metadata.MD
This one will be included during Logger build
func LoggerGRPCInterceptorFxOption ¶
LoggerGRPCInterceptorFxOption adds Unary Server Interceptor that will log Request and Response if needed
func MapHTTPHeadersToClientMetadataMuxOptionFxOption ¶
MapHTTPHeadersToClientMetadataMuxOptionFxOption adds a Grpc Gateway server mux option that maps incoming HTTP Headers to gRPC Context by checking if they match a list of prefixes. List of prefixes is controlled by config key: `bricks.middleware.map.httpHeaders`
func MonitorFxOption ¶
MonitorFxOption adds default metric client to the graph
func MonitorGRPCClientCallsInterceptorFxOption ¶
MonitorGRPCClientCallsInterceptorFxOption usefull when you want to monitor all your unary gRPC Client calls
func MonitorGRPCInterceptorFxOption ¶
MonitorGRPCInterceptorFxOption adds Unary Server Interceptor that will notify metric provider of every call
func MonitorRESTClientCallsInterceptorFxOption ¶
MonitorRESTClientCallsInterceptorFxOption usefull when you want to monitor all your REST Client calls
func TracerGRPCClientInterceptorFxOption ¶
TracerGRPCClientInterceptorFxOption adds grpc trace client interceptor to the graph
func TracerRESTClientInterceptorFxOption ¶
TracerRESTClientInterceptorFxOption adds REST trace client interceptor to the graph
Types ¶
This section is empty.