Table of Contents

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

services IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.

configureMiddleware bool

When 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 services so that additional calls can be chained.

Type Parameters

TEndpointOptions

The actuator-specific EndpointOptions to configure.

TConfigureEndpointOptions

The actuator-specific EndpointOptions configurer.

TMiddleware

The actuator-specific IEndpointMiddleware.

TEndpointHandlerInterface

The actuator-specific IEndpointHandler<TRequest, TResponse> interface.

TEndpointHandler

The actuator-specific IEndpointHandler<TRequest, TResponse> implementation.

TRequest

The actuator-specific endpoint handler input type.

TResponse

The 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

services IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.

configureEndpoints Action<IEndpointConventionBuilder>

Takes an IEndpointConventionBuilder to customize the mapped endpoints. Useful for tailoring auth requirements.

Returns

IServiceCollection

The incoming services so 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

services IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.

configureCorsPolicy Action<CorsPolicyBuilder>

Takes an CorsPolicyBuilder to customize the policy. Useful to restrict access.

Returns

IServiceCollection

The incoming services so that additional calls can be chained.