You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lori 0.9.0 added a `reason` parameter to `_on_connection_failure` that
identifies the failure stage (DNS, TCP, or SSL). Define redis-local
`ConnectionFailureReason` types and thread the reason through the state
machine to `SessionStatusNotify.redis_session_connection_failed`.
Also fix FFI type mismatch in `_mort.pony` — lori 0.11.0 declares
`@exit(I32)` and `@pony_os_stderr() -> Pointer[None]`, so our
declarations must match.
Copy file name to clipboardExpand all lines: CLAUDE.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ make stop-redis
25
25
26
26
## Dependencies
27
27
28
-
-`ponylang/lori` (0.8.1) — TCP networking (transitively depends on `ponylang/ssl`, hence the `ssl=` build flag)
28
+
-`ponylang/lori` (0.11.0) — TCP networking (transitively depends on `ponylang/ssl`, hence the `ssl=` build flag)
29
29
30
30
## Architecture
31
31
@@ -43,13 +43,14 @@ Package: `redis`
43
43
44
44
-`Session` (actor in `session.pony`): Main entry point. Manages connection lifecycle and pub/sub via a state machine. Implements `lori.TCPConnectionActor & lori.ClientLifecycleEventReceiver`. All state machine classes (`_SessionUnopened`, `_SessionNegotiating`, `_SessionConnected`, `_SessionReady`, `_SessionSubscribed`, `_SessionClosed`) are in `session.pony`, following the postgres pattern.
-`SessionStatusNotify` (in `session_status_notify.pony`): Lifecycle callback interface. All callbacks have default no-op implementations. Callbacks: `redis_session_connected`, `redis_session_connection_failed`, `redis_session_ready`, `redis_session_authentication_failed`, `redis_session_throttled`, `redis_session_unthrottled`, `redis_session_closed`.
46
+
-`SessionStatusNotify` (in `session_status_notify.pony`): Lifecycle callback interface. All callbacks have default no-op implementations. Callbacks: `redis_session_connected`, `redis_session_connection_failed(session, reason)`, `redis_session_ready`, `redis_session_authentication_failed`, `redis_session_throttled`, `redis_session_unthrottled`, `redis_session_closed`.
47
47
-`ResultReceiver` (in `result_receiver.pony`): Command response callback interface. Callbacks: `redis_response`, `redis_command_failed`.
48
48
-`SubscriptionNotify` (in `subscription_notify.pony`): Pub/sub callback interface. All callbacks have default no-op implementations. Callbacks: `redis_subscribed`, `redis_unsubscribed`, `redis_message`, `redis_psubscribed`, `redis_punsubscribed`, `redis_pmessage`.
49
49
-`ClientError` (in `client_error.pony`): Client-side error trait with `SessionNotReady`, `SessionClosed`, `SessionConnectionLost`, `SessionProtocolError`, `SessionInSubscribedMode`, and `SessionBackpressureOverflow` primitives.
50
50
-`_ResponseHandler` (in `_response_handler.pony`): Loops `_RespParser` over a `buffered.Reader`, routing `RespPush` to `on_push` and other `RespValue`s to `on_response`. Shuts down on `RespMalformed`.
51
51
-`_BuildHelloCommand` / `_BuildAuthCommand` (primitives in `session.pony`): Build HELLO 3 and AUTH commands for protocol negotiation and authentication.
52
52
-`_BufferedSend` (class val in `session.pony`): Serialized command buffered during backpressure. Holds wire-format bytes and an optional `_QueuedCommand` for response matching.
53
+
-`ConnectionFailureReason` (type alias in `connection_failure_reason.pony`): `(ConnectionFailedDNS | ConnectionFailedTCP | ConnectionFailedSSL)`. Passed to `redis_session_connection_failed` to identify the failure stage.
53
54
-`_IllegalState` / `_Unreachable` (in `_mort.pony`): Primitives for detecting impossible states.
0 commit comments