CommunityToolkit.Aspire.Hosting.SurrealDb
📦 CommunityToolkit.Aspire.Hosting.SurrealDbv13.6.1Import path
apphost/modules/aspire11Functions
3Types
3 types, 11 functions and 15 members
Handles
Functions
DistributedApplicationBuilder
SurrealDbDatabaseResource
SurrealDbNamespaceResource
method
AddDatabasebuilderAdds a SurrealDB database resource to the application model
AddDatabase(name string, options ...*AddDatabaseOptions) SurrealDbDatabaseResourcemethod
WithCreationScriptbuilderDefines the SQL script used to create the namespace.
WithCreationScript(script string) SurrealDbNamespaceResourceSurrealDbServerResource
method
AddNamespacebuilderAdds a SurrealDB namespace resource to the application model
AddNamespace(name string, options ...*AddNamespaceOptions) SurrealDbNamespaceResourcemethod
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(options ...*WithDataVolumeOptions) 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(options ...*WithSurrealistOptions) SurrealDbServerResource