netlify library
Netlify Fetch adapters and runtime metadata for Routed applications.
Classes
- FetchRequestView
- Host-neutral view of a Fetch-style request.
- FetchResponseView
- Host-neutral response value produced for Fetch-style hosts.
- FetchWebSocketUpgrade
- Defines the public contract for this host integration.
- RoutedNodeCapabilities
- Capabilities declared by one host invocation.
- RoutedNodeContext
- Runtime-scoped host context carried through a Routed request.
- RoutedNodeExtension
- A typed lookup for host-owned request context values.
- RoutedNodeLifecycleEvent
-
Host lifecycle event published through Routed's existing
EventManager. - RoutedNodeRuntimeInfo
- Common runtime metadata exposed by a host adapter.
Enums
- RoutedNodeEntryModel
- Whether a host owns a long-lived listener or invokes a fetch export.
- RoutedNodeLifecyclePhase
-
Lifecycle phases emitted by a
routed_nodehost. - RoutedNodeRuntime
-
Runtime families supported by
routed_node.
Constants
- netlifyCapabilities → const RoutedNodeCapabilities
- Netlify Edge Functions expose Fetch-style request/response handlers, but Netlify does not provide a server-side socket upgrade boundary to the Edge Function. Real-time connections must use a managed WebSocket provider (for example Ably) or a separate WebSocket service.
Functions
-
defineFetchExport(
String runtime, Engine engine, {required RoutedNodeCapabilities capabilities, String name = '__routed_fetch__'}) → Never - VM stub for JavaScript Fetch exports.
-
defineFetchExportAsync(
String runtime, Future< Engine> engineFuture, {required RoutedNodeCapabilities capabilities, String name = '__routed_fetch__'}) → Never - VM stub for asynchronous JavaScript Fetch exports.
-
defineFetchExportFactoryAsync(
String runtime, Future< Engine> engineFactory(), {required RoutedNodeCapabilities capabilities, String name = '__routed_fetch__'}) → Never - VM stub for lazy asynchronous JavaScript Fetch exports.
-
defineNetlifyFetch(
Object engine) → void - Installs the Netlify Fetch bootstrap function.
-
defineNetlifyFetchAsync(
Future< Engine> engine) → void - Installs a Netlify Fetch export from an asynchronously-built engine.
-
defineNetlifyFetchFactoryAsync(
Future< Engine> factory()) → void - Installs a Netlify Fetch entry whose engine is created lazily on request.
-
dispatchFetchConnection(
Engine engine, FetchRequestView request, ResponseAdapter response, {required RoutedNodeRuntimeInfo runtime, Uri? baseUri, Future< FetchWebSocketUpgrade> acceptWebSocket()?}) → Future<void> - Dispatches a Fetch-style request through the streaming adapter path.
-
dispatchFetchExchange(
Engine engine, FetchRequestView request, {required RoutedNodeRuntimeInfo runtime, Uri? baseUri}) → Future< FetchResponseView> - Dispatches a Fetch-style request through Routed's buffered portable path.
-
portableRequestFromFetch(
FetchRequestView request, {Uri? baseUri}) → PortableRequest - Converts a Fetch-style request into the core portable request contract.
-
publishRoutedNodeLifecycle(
Engine engine, RoutedNodeLifecycleEvent event) → void - Publishes a host lifecycle event when the engine has an EventManager.