ConnectionHealthChecker Module

Module for monitoring and managing connection health

Types

Type Description

ActiveConnectionTracker<'T>

Tracks connections currently in use (not in pool)

HealthCheckerConfig

Configuration for health checker behavior

Functions and values

Function or value Description

checkConnectionHealth socket

Full Usage: checkConnectionHealth socket

Parameters:
Returns: ConnectionHealth

Checks health of a single connection

socket : Socket option
Returns: ConnectionHealth

defaultConfig

Full Usage: defaultConfig

Returns: HealthCheckerConfig

Default health checker configuration

Returns: HealthCheckerConfig

startHealthChecker tracker config getSocket isLongLived closeConnection

Full Usage: startHealthChecker tracker config getSocket isLongLived closeConnection

Parameters:
Returns: Task

Starts the background health checker for active connections

tracker : ActiveConnectionTracker<'T>
config : HealthCheckerConfig
getSocket : 'T -> Socket option
isLongLived : 'T -> bool
closeConnection : 'T -> unit
Returns: Task

stopHealthChecker checkerTask

Full Usage: stopHealthChecker checkerTask

Parameters:
    checkerTask : Task

Returns: Task

Stops the background health checker

checkerTask : Task
Returns: Task