FlowEndpointModule

PackageAxial.Hosting.AspNetCore

Summary

NameSignatureSynopsis
Operations
flowEndpointWithOptionsflowEndpointWithOptions options getAppEnvironment mapApplicationError workflowLowers an endpoint Flow to the native ASP.NET Core handler expected by minimal-API routing.
flowEndpointflowEndpoint getAppEnvironment mapApplicationError workflowRuns a request with Microsoft logging in category Axial.Endpoint.

Operations

kind:member

flowEndpointWithOptions

flowEndpointWithOptions options getAppEnvironment mapApplicationError workflow
Member
Lowers an endpoint Flow to the native ASP.NET Core handler expected by minimal-API routing.

Parameters

NameTypeDescription
optionsEndpointOptionsCustom log-sink callbacks run once per request. Default caches the Axial.Endpoint Microsoft logging adapter per factory.
getAppEnvironmentHttpContext -> 'appConstructs or resolves the explicit application environment for the current request.
mapApplicationError'error -> IResultMaps one expected application failure to an ASP.NET result.
workflowFlow<HttpEndpointEnv<'app>, EndpointError<'error>, IResult>The complete endpoint Flow to execute.

Returns

Func<HttpContext, Task<IResult>>

Verification Examples

let endpoint = flowEndpoint AppEnv.fromContext ApiError.toResponse
app.MapPost("/signups", endpoint signupEndpoint)
kind:member

flowEndpoint

flowEndpoint getAppEnvironment mapApplicationError workflow
Member
Runs a request with Microsoft logging in category Axial.Endpoint. Inner scoped sinks override it.

Parameters

NameTypeDescription
getAppEnvironmentHttpContext -> 'a
mapApplicationError'b -> IResult
workflowFlow<HttpEndpointEnv<'a>, EndpointError<'b>, IResult>

Returns

Func<HttpContext, Task<IResult>>