Home > @cerbos/embedded > Embedded > (constructor)
Create a client for interacting with an embedded Cerbos policy decision point (PDP), using the default Loader to load the embedded PDP bundle.
Signature:
constructor(source: Source, options?: Options);
Parameter |
Type |
Description |
---|---|---|
source |
WebAssembly binary code of an embedded PDP bundle, or a URL or HTTP response from which to stream it. | |
options |
(Optional) additional settings. |
This is equivalent to new Embedded(new Loader(source, options))
.
Bundle download URLs are available in the "Embedded" section of the "Decision points" page of your Cerbos Hub workspace.
Fetch an embedded PDP bundle via HTTP in a supported browser or Node.js 18.1+:
const cerbos = new Embedded("https://lite.cerbos.cloud/bundle?workspace=...&label=...");