CommunityToolkit.Aspire.Hosting.SurrealDb
📦 CommunityToolkit.Aspire.Hosting.SurrealDb v13.4.0 11 Functions
3 Types
3 types and 15 members
Types
Functions
method
addDatabase builder Adds a SurrealDB database resource to the application model
addDatabase(name: string, databaseName?: string): SurrealDbDatabaseResource method
addNamespace builder Adds a SurrealDB namespace resource to the application model
addNamespace(name: string, namespaceName?: string): SurrealDbNamespaceResource method
addSurrealServer builder Adds a SurrealDB resource to the application model. A container is used for local development. The default image is and the tag is .
addSurrealServer(name: string, userName?: ParameterResource, password?: ParameterResource, port?: number, path?: string, strictMode?: boolean): SurrealDbServerResource method
withCreationScript builder Defines the SQL script used to create the namespace.
withCreationScript(script: string): SurrealDbNamespaceResource method
withCreationScript builder Defines the SQL script used to create the database.
withCreationScript(script: string): SurrealDbDatabaseResource method
withDataBindMount builder Adds a bind mount for the data folder to a SurrealDB resource.
withDataBindMount(source: string): SurrealDbServerResource method
withDataVolume builder Adds a named volume for the data folder to a SurrealDB resource.
withDataVolume(name?: string): SurrealDbServerResource method
withInitFiles builder Copies init files into a SurrealDB container resource.
withInitFiles(source: string): SurrealDbServerResource method
withLogLevel builder withLogLevel(logLevel: string): SurrealDbServerResource method
withSurrealDbOtlpExporter builder Injects the appropriate environment variables to allow the resource to enable sending telemetry to the dashboard. 1. It sets the OTLP endpoint to the value of the DOTNET_DASHBOARD_OTLP_ENDPOINT_URL environment variable. 2. It sets the service name and instance id to the resource name and UID. Values are injected by the orchestrator. 3. It sets a small batch schedule delay in development. This reduces the delay that OTLP exporter waits to sends telemetry and makes the dashboard telemetry pages responsive.
withSurrealDbOtlpExporter(): SurrealDbServerResource method
withSurrealist builder withSurrealist(containerName?: string): SurrealDbServerResource