SurrealDbBuilderExtensions
Classstaticnet10.0
Provides extension methods for adding SurrealDB resources to the application model.
namespace Aspire.Hosting;
public static class SurrealDbBuilderExtensions{ // ...}11 members
Methods11
Section titled MethodsIResourceBuilder<SurrealDbDatabaseResource> Adds a SurrealDB database to the application model. This is a child resource of a
SurrealDbNamespaceResource . IResourceBuilder<SurrealDbNamespaceResource> Adds a SurrealDB namespace to the application model. This is a child resource of a
SurrealDbServerResource . AddSurrealServer(IDistributedApplicationBuilder, string, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>, int?, string) extensionats exportIResourceBuilder<SurrealDbServerResource> Adds a SurrealDB resource to the application model. A container is used for local development. The default image is and the tag is .
WithCreationScript(IResourceBuilder<SurrealDbNamespaceResource>, string) extensionexperimentalats exportIResourceBuilder<SurrealDbNamespaceResource> Defines the SQL script used to create the namespace.
WithCreationScript(IResourceBuilder<SurrealDbDatabaseResource>, string) extensionexperimentalats exportIResourceBuilder<SurrealDbDatabaseResource> Defines the SQL script used to create the database.
IResourceBuilder<SurrealDbServerResource> Adds a bind mount for the data folder to a SurrealDB resource.
IResourceBuilder<SurrealDbServerResource> Adds a named volume for the data folder to a SurrealDB resource.
IResourceBuilder<SurrealDbServerResource> Copies init files into a SurrealDB container resource.
IResourceBuilder<SurrealDbServerResource> Configures logging level for the SurrealDB container resource.
IResourceBuilder<SurrealDbServerResource> 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.
WithSurrealist(IResourceBuilder<T>, Action<IResourceBuilder<SurrealistContainerResource>>, string?) extensionats ignoredIResourceBuilder<T> Adds a Surrealist UI instance for SurrealDB to the application model. The default image is and the tag is .