CommunityToolkit.Aspire.Hosting.SurrealDb
📦 CommunityToolkit.Aspire.Hosting.SurrealDbv13.4.011Functions
3Types
3 types and 15 members
Types
Functions
method
addDatabasebuilderAdds a SurrealDB database resource to the application model
addDatabase(name: string, databaseName?: string): SurrealDbDatabaseResourcemethod
addNamespacebuilderAdds a SurrealDB namespace resource to the application model
addNamespace(name: string, namespaceName?: string): SurrealDbNamespaceResourcemethod
addSurrealServerbuilderAdds 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): SurrealDbServerResourcemethod
withCreationScriptbuilderDefines the SQL script used to create the namespace.
withCreationScript(script: string): SurrealDbNamespaceResourcemethod
withCreationScriptbuilderDefines the SQL script used to create the database.
withCreationScript(script: string): SurrealDbDatabaseResourcemethod
withDataBindMountbuilderAdds a bind mount for the data folder to a SurrealDB resource.
withDataBindMount(source: string): SurrealDbServerResourcemethod
withDataVolumebuilderAdds a named volume for the data folder to a SurrealDB resource.
withDataVolume(name?: string): SurrealDbServerResourcemethod
withInitFilesbuilderCopies init files into a SurrealDB container resource.
withInitFiles(source: string): SurrealDbServerResourcemethod
withLogLevelbuilderwithLogLevel(logLevel: string): SurrealDbServerResourcemethod
withSurrealDbOtlpExporterbuilderInjects 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(): SurrealDbServerResourcemethod
withSurrealistbuilderwithSurrealist(containerName?: string): SurrealDbServerResource