providers

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 12 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildMortarWebService = constructors.Service

BuildMortarWebService is a constructor that creates and registers fx.LifeCycle hooks for Mortar web services

Consider using BuildMortarWebServiceFxOption if you only want to invoke it.

View Source
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.

View Source
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.

View Source
var CreateFxEventLogger = logger.CreateFxEventLogger

CreateFxEventLogger is a constuctor that creates a custom fxevent.Logger

Consider using FxEventLoggerOption if you only want to invoke it.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
var HTTPClientBuilder = partial.HTTPClientBuilder

HTTPClientBuilder is a constructor that creates HTTP Client builder

Consider using HTTPClientBuildersFxOption if you only want to provide it.

View Source
var HTTPServerBuilder = partial.HTTPServerBuilder

HTTPServerBuilder is a constructor that creates a partial Mortars HTTP Server Builder

Consider using HTTPServerBuilderFxOption if you only want to provide it.

View Source
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.

View Source
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.

JWTExtractor is a constructor for Default JWT Token Extractor

Consider using JWTExtractorFxOption if you only want to provide it.

View Source
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.

View Source
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.

View Source
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: `mortar.middleware.map.httpHeaders`

Consider using MapHTTPHeadersToClientMetadataMuxOptionFxOption if you only want to provide it.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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 BuildMortarWebServiceFxOption

func BuildMortarWebServiceFxOption() fx.Option

BuildMortarWebServiceFxOption creates the entire dependency graph and registers all provided fx.LifeCycle hooks

func CopyGRPCHeadersClientInterceptorFxOption

func CopyGRPCHeadersClientInterceptorFxOption() fx.Option

CopyGRPCHeadersClientInterceptorFxOption adds grpc Client Interceptor that copies values from grpc Incoming to Outgoing metadata

func CopyGRPCHeadersHTTPClientInterceptorFxOption added in v1.0.11

func CopyGRPCHeadersHTTPClientInterceptorFxOption() fx.Option

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 added in v1.0.11

func DumpRESTClientInterceptorFxOption() fx.Option

DumpRESTClientInterceptorFxOption usefull when you want to log what is actually sent to the external HTTP server and what was returned.

func FxEventLoggerOption added in v1.0.16

func FxEventLoggerOption() fx.Option

FxEventLoggerOption add new Fx Event option to output fx events using structured logger

func GRPCGatewayMetadataTraceCarrierFxOption

func GRPCGatewayMetadataTraceCarrierFxOption() fx.Option

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

func GRPCTracingUnaryServerInterceptorFxOption() fx.Option

GRPCTracingUnaryServerInterceptorFxOption adds grpc trace unary server interceptor to the graph

func HTTPClientBuildersFxOption

func HTTPClientBuildersFxOption() fx.Option

HTTPClientBuildersFxOption adds both (GRPC, REST) partial http clients to the graph

func HTTPServerBuilderFxOption

func HTTPServerBuilderFxOption() fx.Option

HTTPServerBuilderFxOption adds Default Http Server builder which later injected to the Service Invoke option by calling BuildMortarWebServiceFxOption fx.Invoke option to the graph

func InternalDebugHandlersFxOption

func InternalDebugHandlersFxOption() fx.Option

InternalDebugHandlersFxOption adds Internal Debug Handlers to the graph

func InternalProfileHandlerFunctionsFxOption

func InternalProfileHandlerFunctionsFxOption() fx.Option

InternalProfileHandlerFunctionsFxOption adds Internal Profiler Handler to the graph

func InternalSelfHandlersFxOption

func InternalSelfHandlersFxOption() fx.Option

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

func JWTExtractorFxOption() fx.Option

JWTExtractorFxOption adds default JWT extractor from context.Context to the graph

func LoggerFxOption

func LoggerFxOption() fx.Option

LoggerFxOption adds Default Logger to the graph

func LoggerGRPCIncomingContextExtractorFxOption

func LoggerGRPCIncomingContextExtractorFxOption() fx.Option

LoggerGRPCIncomingContextExtractorFxOption adds Logger Context Extractor using values within incoming grpc metadata.MD

This one will be included during Logger build

func LoggerGRPCInterceptorFxOption

func LoggerGRPCInterceptorFxOption() fx.Option

LoggerGRPCInterceptorFxOption adds Unary Server Interceptor that will log Request and Response if needed

func MapHTTPHeadersToClientMetadataMuxOptionFxOption added in v1.0.17

func MapHTTPHeadersToClientMetadataMuxOptionFxOption() fx.Option

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: `mortar.middleware.map.httpHeaders`

func MonitorFxOption

func MonitorFxOption() fx.Option

MonitorFxOption adds default metric client to the graph

func MonitorGRPCClientCallsInterceptorFxOption added in v1.0.11

func MonitorGRPCClientCallsInterceptorFxOption() fx.Option

MonitorGRPCClientCallsInterceptorFxOption usefull when you want to monitor all your unary gRPC Client calls

func MonitorGRPCInterceptorFxOption

func MonitorGRPCInterceptorFxOption() fx.Option

MonitorGRPCInterceptorFxOption adds Unary Server Interceptor that will notify metric provider of every call

func MonitorRESTClientCallsInterceptorFxOption added in v1.0.11

func MonitorRESTClientCallsInterceptorFxOption() fx.Option

MonitorRESTClientCallsInterceptorFxOption usefull when you want to monitor all your REST Client calls

func TracerGRPCClientInterceptorFxOption

func TracerGRPCClientInterceptorFxOption() fx.Option

TracerGRPCClientInterceptorFxOption adds grpc trace client interceptor to the graph

func TracerRESTClientInterceptorFxOption

func TracerRESTClientInterceptorFxOption() fx.Option

TracerRESTClientInterceptorFxOption adds REST trace client interceptor to the graph

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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