FdbClusterResource
Namespace: Aspire.Hosting.ApplicationModel · class
Implements: ContainerResource, IResource, IResourceWithEnvironment, IResourceWithArgs, IResourceWithEndpoints, IResourceWithWaitSupport, IResourceWithProbes, IComputeResource, IFdbResource, IResourceWithConnectionString, IExpressionValue, IValueProvider, IManifestExpressionProvider, IValueWithReferences
Represents a FoundationDB cluster resource in a distributed application.
Remarks
During local development, a local docker image is used to run a single-node cluster.
Constructors
FdbClusterResource
FdbClusterResource(string name, string entrypoint = null)
A resource that represents a FoundationDB cluster
name— The name of the resource.entrypoint— An optional container entrypoint.
Properties
ApiVersion
int ApiVersion { get; set; }
The minimum API version that must be supported by the cluster
See for more information.
AutoProvision
bool AutoProvision { get; set; }
Specifies if the database is configured automatically when the container starts on a fresh volume (enabled by default)
A cluster on a brand-new volume has no database until configure new runs once. Without provisioning, every client waits until its transaction timeout.
An already-configured database is left untouched. Only applies when the AppHost runs the container (run mode).
ClusterDescription
string ClusterDescription { get; set; }
Specifies the description field in the cluster connection string.
This corresponds to the 'description' part of the equivalent 'fdb.cluster' file.
This value is for humans only, and is not significant for the connection itself.
Defaults to "docker" when omitted.
ClusterId
string ClusterId { get; set; }
Specifies the 'id' part of the locally generated 'fdb.cluster' file.
This corresponds to the 'id' part of the equivalent 'fdb.cluster' file.
This value must match the id of the cluster, and if incorrect or changed, may prevent the process from connecting successfully.
Defaults to "docker" when omitted.
ClusterVersion
Version ClusterVersion { get; set; }
If specified, the minimum version of the cluster to be deployed.
If , the best version compatible with will be selected
ConnectionStringExpression
ReferenceExpression ConnectionStringExpression { get; }
DefaultRetryLimit
int? DefaultRetryLimit { get; set; }
Default transaction retry limit
See for more information.
DefaultTimeout
TimeSpan? DefaultTimeout { get; set; }
Default transaction timeout
See for more information.
DefaultTracing
FdbTracingOptions? DefaultTracing { get; set; }
Default tracing options
See for more information.
DisableNativePreloading
bool DisableNativePreloading { get; set; }
Specifies if native preloading should be enabled or disabled
If true, the value of NativeLibraryPath will be ignored.
See DisableNativeLibraryPreloading for more information.
DockerTag
string DockerTag { get; set; }
Tag of the docker image that will be used to run the cluster locally. (ex: "latest", "7.4.6", "7.3.68", ...)
LogSessionId
string LogSessionId { get; set; }
Specifies the common Session ID used by all resources when logging transactions, during local development.
All transactions logged by any node using this cluster resource will use the same session identifier, allowing for easier merging and scanning for conflicting transactions or correlated errors.
This should only be used during local development.
NativeLibraryPath
string NativeLibraryPath { get; set; }
Path to the local native client library (fdb_c.dll on Windows, libfdb_c.so on Linux, libfdb_c.dylib on macOS, ...)
This value is ignored if DisableNativePreloading is set to true.
See SetNativeLibPath for more information.
ReadOnly
bool? ReadOnly { get; set; }
Specifies if the FoundationDB cluster is mounted in read-only mode by default.
See for more information.
RollForward
FdbVersionPolicy RollForward { get; set; }
Strategy used to select the actual runtime version of the deployed cluster.
The strategy works similarly to the rollForward property of the global.json file, see https://learn.microsoft.com/en-us/dotnet/core/tools/global-json.
Root
FdbPath Root { get; set; }
Specifies the default root path of the partition used by all processes.
See for more information.
Methods
GetConnectionString
string GetConnectionString()
Generates the Connection String that can be injected into other processes to connect to this cluster