Header menu logo FSharp.ATProto

XrpcServer Module

XRPC server builder and configuration.

Functions and values

Function or value Description

addEndpoint ep config

Full Usage: addEndpoint ep config

Parameters:
Returns: XrpcServerConfig

Add an endpoint to the server config.

ep : XrpcEndpoint
config : XrpcServerConfig
Returns: XrpcServerConfig

configure config

Full Usage: configure config

Parameters:
Returns: WebApplication

Build and configure a WebApplication with all registered XRPC endpoints.

config : XrpcServerConfig
Returns: WebApplication

configureWithPort port config

Full Usage: configureWithPort port config

Parameters:
Returns: WebApplication

Configure and set the server to listen on the given port.

port : int
config : XrpcServerConfig
Returns: WebApplication

endpoint nsid method handler

Full Usage: endpoint nsid method handler

Parameters:
Returns: XrpcEndpoint

Create an XRPC endpoint definition.

nsid : Nsid
method : XrpcMethod
handler : HttpContext -> Task<IResult>
Returns: XrpcEndpoint

healthCheck () _ctx

Full Usage: healthCheck () _ctx

Parameters:
Returns: Task<IResult>

Health check handler returning server status.

() : unit
_ctx : HttpContext
Returns: Task<IResult>

withAuth ep

Full Usage: withAuth ep

Parameters:
Returns: XrpcEndpoint

Mark an endpoint as requiring authentication.

ep : XrpcEndpoint
Returns: XrpcEndpoint

withGlobalRateLimit rateLimit config

Full Usage: withGlobalRateLimit rateLimit config

Parameters:
Returns: XrpcServerConfig

Set a global rate limit for endpoints without per-endpoint limits.

rateLimit : RateLimitConfig
config : XrpcServerConfig
Returns: XrpcServerConfig

withJsonOptions options config

Full Usage: withJsonOptions options config

Parameters:
Returns: XrpcServerConfig

Set custom JSON options.

options : JsonSerializerOptions
config : XrpcServerConfig
Returns: XrpcServerConfig

withRateLimit config ep

Full Usage: withRateLimit config ep

Parameters:
Returns: XrpcEndpoint

Set a rate limit on an endpoint.

config : RateLimitConfig
ep : XrpcEndpoint
Returns: XrpcEndpoint

withTokenVerifier verifyToken config

Full Usage: withTokenVerifier verifyToken config

Parameters:
Returns: XrpcServerConfig

Set the token verification function.

verifyToken : string -> Task<Result<ClaimsPrincipal, string>>
config : XrpcServerConfig
Returns: XrpcServerConfig

Type something to start searching.