Class CoreActuatorServiceCollectionExtensions
- Namespace
- Steeltoe.Management.Endpoint
- Assembly
- Steeltoe.Management.Endpoint.dll
public static class CoreActuatorServiceCollectionExtensions
- Inheritance
-
CoreActuatorServiceCollectionExtensions
- Inherited Members
Methods
AddCoreActuatorServices<TEndpointOptions, TConfigureEndpointOptions, TMiddleware, TEndpointHandlerInterface, TEndpointHandler, TRequest, TResponse>(IServiceCollection, bool)
Registers endpoint options configuration, middleware, and handler as singleton services.
This low-level extension method is intended to be called when implementing custom actuator endpoints.
public static IServiceCollection AddCoreActuatorServices<TEndpointOptions, TConfigureEndpointOptions, TMiddleware, TEndpointHandlerInterface, TEndpointHandler, TRequest, TResponse>(this IServiceCollection services, bool configureMiddleware) where TEndpointOptions : EndpointOptions where TConfigureEndpointOptions : class, IConfigureOptionsWithKey<TEndpointOptions> where TMiddleware : class, IEndpointMiddleware where TEndpointHandlerInterface : class, IEndpointHandler<TRequest, TResponse> where TEndpointHandler : class, TEndpointHandlerInterface
Parameters
servicesIServiceCollectionThe IServiceCollection to add services to.
configureMiddlewareboolWhen
false, skips configuration of the ASP.NET Core middleware pipeline. While this provides full control over the pipeline order, it requires manual addition of the appropriate middleware for actuators to work correctly.
Returns
- IServiceCollection
The incoming
servicesso that additional calls can be chained.
Type Parameters
TEndpointOptionsThe actuator-specific EndpointOptions to configure.
TConfigureEndpointOptionsThe actuator-specific EndpointOptions configurer.
TMiddlewareThe actuator-specific IEndpointMiddleware.
TEndpointHandlerInterfaceThe actuator-specific IEndpointHandler<TRequest, TResponse> interface.
TEndpointHandlerThe actuator-specific IEndpointHandler<TRequest, TResponse> implementation.
TRequestThe actuator-specific endpoint handler input type.
TResponseThe actuator-specific endpoint handler output type.
ConfigureActuatorEndpoints(IServiceCollection, Action<IEndpointConventionBuilder>)
Configures an Action<T> to customize the mapped actuator endpoints.
public static IServiceCollection ConfigureActuatorEndpoints(this IServiceCollection services, Action<IEndpointConventionBuilder> configureEndpoints)
Parameters
servicesIServiceCollectionThe IServiceCollection to add services to.
configureEndpointsAction<IEndpointConventionBuilder>Takes an IEndpointConventionBuilder to customize the mapped endpoints. Useful for tailoring auth requirements.
Returns
- IServiceCollection
The incoming
servicesso that additional calls can be chained.
ConfigureActuatorsCorsPolicy(IServiceCollection, Action<CorsPolicyBuilder>)
Configures an Action<T> to customize the Cross-Origin Resource Sharing (CORS) policy that applies to all actuator endpoints.
public static IServiceCollection ConfigureActuatorsCorsPolicy(this IServiceCollection services, Action<CorsPolicyBuilder> configureCorsPolicy)
Parameters
servicesIServiceCollectionThe IServiceCollection to add services to.
configureCorsPolicyAction<CorsPolicyBuilder>Takes an CorsPolicyBuilder to customize the policy. Useful to restrict access.
Returns
- IServiceCollection
The incoming
servicesso that additional calls can be chained.