Documentation
¶
Index ¶
- Variables
- func NewConnectServer(config connectrpco.ConnectConfig, connectHandlers []httpo.HttpPatternHandler, ...) error
- func SupplyConnectHandler(fn func(opts ...connect.HandlerOption) (string, http.Handler)) fx.Option
- func SupplyConnectHandlerOptions(opts ...connect.HandlerOption) fx.Option
- func SupplyHttpMiddleware(middleware ...httpo.HttpMiddleware) fx.Option
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("connectrpc",
provideConnectConfigPointer,
provideConnectConfig,
provideConnectServiceNames,
provideAllConnectHandlers,
invokeServer,
)
View Source
var WithCorsHttpMiddleware = fx.Provide( fx.Annotate( connectrpco.NewCorsHandler, fx.ParamTags(fxtags.Named(corso.NamedConfig)), fx.ResultTags(fxtags.Group(connectrpco.GroupHttpMiddleware)), ), )
View Source
var WithGrpcHealthHandler = fx.Provide( fx.Annotate( connectrpco.NewGrpcHealthHandler, fx.ParamTags( fxtags.Group(connectrpco.GroupConnectServiceNames), fxtags.Group(connectrpco.GroupConnectHandlerOptions), ), fx.ResultTags(fxtags.GroupFlatten(connectrpco.GroupUtilityConnectHandler)), ), )
View Source
var WithGrpcReflectHandler = fx.Provide( fx.Annotate( connectrpco.NewGrpcReflectHandler, fx.ParamTags( fxtags.Group(connectrpco.GroupConnectServiceNames), fxtags.Group(connectrpco.GroupConnectHandlerOptions), ), fx.ResultTags(fxtags.GroupFlatten(connectrpco.GroupUtilityConnectHandler)), ), )
View Source
var WithOtelConnectInterceptor = func(trustRemote bool, omitTraceEvents bool) fx.Option { var opts []otelconnect.Option if trustRemote { opts = append(opts, otelconnect.WithTrustRemote()) } if omitTraceEvents { opts = append(opts, otelconnect.WithoutTraceEvents()) } return fx.Provide( fx.Annotate( func() (connect.HandlerOption, error) { otelInterceptor, err := otelconnect.NewInterceptor(opts...) if err != nil { return nil, err } return connect.WithInterceptors(otelInterceptor), nil }, fx.ResultTags(fxtags.Group(connectrpco.GroupConnectHandlerOptions)), ), ) }
Functions ¶
func NewConnectServer ¶
func NewConnectServer( config connectrpco.ConnectConfig, connectHandlers []httpo.HttpPatternHandler, httpMiddleware []httpo.HttpMiddleware, log fx.Printer, lifecycle fx.Lifecycle, ) error
func SupplyConnectHandler ¶
func SupplyConnectHandlerOptions ¶
func SupplyConnectHandlerOptions(opts ...connect.HandlerOption) fx.Option
func SupplyHttpMiddleware ¶
func SupplyHttpMiddleware(middleware ...httpo.HttpMiddleware) fx.Option
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.