ciallo-js

    JavaScript & Edge Web Fetch adapter (Cloudflare Workers, Vercel Edge, Deno, Bun, Node) for unmbt/ciallo

    web
    workers
    cloudflare
    edge
    fetch
    ciallo
    Download zip
    Author
    Version
    0.1.1
    License
    MIT
    Last updated
    13 hours ago
    Downloads
    8

    #unmbt/ciallo-js

    JavaScript & Edge Web Fetch adapter (Cloudflare Workers, Vercel Edge, Deno, Bun, Node 18+) for unmbt/ciallo.

    JsEnv

    #external
    pub type JsEnv

    JsExecutionContext

    #external
    pub type JsExecutionContext

    JsRequest

    #external
    pub type JsRequest

    JsResponse

    #external
    pub type JsResponse

    JsWebSocket

    #external
    pub type JsWebSocket

    JsWsHandler

    pub(all) struct JsWsHandler {
    on_open : (JsWsSession) -> Unit
    on_message : (JsWsSession,
    WsMessage
    ) -> Unit
    on_close : (JsWsSession,
    WsCloseCode
    , String) -> Unit
    }

    JsWsHandler::JsWsHandler

    fn JsWsHandler::JsWsHandler(on_open? : (JsWsSession) -> Unit, on_message~ : (JsWsSession,
    WsMessage
    ) -> Unit, on_close? : (JsWsSession,
    WsCloseCode
    , String) -> Unit) -> JsWsHandler

    JsWsSession

    pub struct JsWsSession {
    ws : JsWebSocket
    }

    Cloudflare Workers / Edge WebSocket session wrapping the server end of WebSocketPair.

    JsWsSession::close

    fn JsWsSession::close(self : JsWsSession, code? :
    WsCloseCode
    , reason? : String) -> Unit

    JsWsSession::send

    to_fetch_handler_with_ws

    Creates a Fetch handler supporting both HTTP routes on app and first-class Cloudflare Workers WebSocketPair upgrades for paths registered in ws_routes.