| /** | |
| * Runs the server side of the unstable Effect devtools socket protocol. | |
| * | |
| * Use this module when an integration needs to accept devtools clients over a | |
| * `SocketServer`, decode newline-delimited JSON messages, and handle each | |
| * connection with application-specific logic. It does not interpret spans or | |
| * metrics itself; it gives handlers a typed surface for the telemetry described | |
| * by `DevToolsSchema`. | |
| * | |
| * @since 4.0.0 | |
| */ | |
| import * as Effect from "../../Effect.ts"; | |
| import * as Queue from "../../Queue.ts"; | |
| import * as SocketServer from "../socket/SocketServer.ts"; | |
| import * as DevToolsSchema from "./DevToolsSchema.ts"; | |
| /** | |
| * Handle for a connected devtools client. | |
| * | |
| * **Details** | |
| * | |
| * It exposes a queue of non-ping requests received from the socket and a | |
| * `send` function for non-pong responses. | |
| * | |
| * @category models | |
| * @since 4.0.0 | |
| */ | |
| export interface Client { | |
| readonly queue: Queue.Dequeue<DevToolsSchema.Request.WithoutPing>; | |
| readonly send: (_: DevToolsSchema.Response.WithoutPong) => Effect.Effect<void>; | |
| } | |
| /** | |
| * Runs the devtools socket server. | |
| * | |
| * **Details** | |
| * | |
| * Each connection is decoded as NDJSON devtools protocol messages, `Ping` | |
| * requests are answered with `Pong`, and all other requests are delivered | |
| * through the `Client` passed to the handler. | |
| * | |
| * @category constructors | |
| * @since 4.0.0 | |
| */ | |
| export declare const run: <_, E, R>(handle: (client: Client) => Effect.Effect<_, E, R>) => Effect.Effect<never, SocketServer.SocketServerError, R | SocketServer.SocketServer>; | |
| //# sourceMappingURL=DevToolsServer.d.ts.map |
Xet Storage Details
- Size:
- 1.58 kB
- Xet hash:
- f776e342253c416284c82b4acbbb7586a3da691f9fb142a8404c9ac5a7781aa5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.