Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

RavenDBServerResource

Handle
📦 CommunityToolkit.Aspire.Hosting.RavenDB v13.6.1

A resource that represents a RavenDB container.

type RavenDBServerResource interface {
ExpressionValue
IComputeResource
Resource
ResourceWithArgs
ResourceWithConnectionString
ResourceWithEndpoints
ResourceWithEnvironment
ResourceWithWaitSupport
}

Properties

propertyConnectionStringExpression*ReferenceExpressionget
Gets the connection string expression for the RavenDB server, formatted as "http(s)://{Host}:{Port}" depending on the security setting.
ConnectionStringExpression() *ReferenceExpression
propertyDatabasesmap[string]stringget
Gets a read-only dictionary of databases associated with this server resource. The key represents the resource name, and the value represents the database name.
Databases() (map[string]string, error)
propertyHostEndpointReferenceExpressionget
Gets the host endpoint reference for this resource.
Host() EndpointReferenceExpression
propertyPortEndpointReferenceExpressionget
Gets the port endpoint reference for this resource.
Port() EndpointReferenceExpression
propertyPrimaryEndpointEndpointReferenceget
Gets the primary endpoint for the RavenDB server.
PrimaryEndpoint() EndpointReference
propertyTcpEndpointEndpointReferenceget
Gets the TCP endpoint for the RavenDB server.
TcpEndpoint() EndpointReference
propertyUriExpression*ReferenceExpressionget
Gets the connection URI expression for the RavenDB server.
UriExpression() *ReferenceExpression

Methods

methodAddDatabasebuilder
Adds a database resource to an existing RavenDB server resource.
AddDatabase(
name string,
options ...*AddDatabaseOptions,
) RavenDBDatabaseResource
namestringThe name of the database resource.
options...*AddDatabaseOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddDatabaseOptions argument.

DatabaseName*stringThe name of the database to create/add. Defaults to the same name as the resource if not provided.
EnsureCreated*boolIndicates whether the database should be created on startup if it does not already exist.
RavenDBDatabaseResource

A resource builder for the newly added RavenDB database resource.

Returns a handle; failures surface later via Err().

methodWithDataBindMountbuilder
Adds a bind mount for the data folder to a RavenDB container resource.
WithDataBindMount(
source string,
options ...*WithDataBindMountOptions,
) RavenDBServerResource
sourcestringThe source directory on the host to mount into the container.
options...*WithDataBindMountOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDataBindMountOptions argument.

IsReadOnly*boolIndicates whether the bind mount should be read-only. Defaults to false.
RavenDBServerResource

The IResourceBuilder for the RavenDB server resource.

Returns a handle; failures surface later via Err().

methodWithDataVolumebuilder
Adds a named volume for the data folder to a RavenDB container resource.
WithDataVolume(options ...*WithDataVolumeOptions) RavenDBServerResource
options...*WithDataVolumeOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDataVolumeOptions argument.

Name*stringOptional name for the volume. Defaults to a generated name if not provided.
IsReadOnly*boolIndicates whether the volume should be read-only. Defaults to false.
RavenDBServerResource

The IResourceBuilder for the RavenDB server resource.

Returns a handle; failures surface later via Err().

methodWithLogBindMountbuilder
Adds a bind mount for the logs folder to a RavenDB container resource.
WithLogBindMount(
source string,
options ...*WithLogBindMountOptions,
) RavenDBServerResource
sourcestringThe source directory on the host to mount into the container.
options...*WithLogBindMountOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithLogBindMountOptions argument.

IsReadOnly*boolIndicates whether the bind mount should be read-only. Defaults to false.
RavenDBServerResource

The IResourceBuilder for the RavenDB server resource.

Returns a handle; failures surface later via Err().

methodWithLogVolumebuilder
Adds a named volume for the logs folder to a RavenDB container resource.
WithLogVolume(options ...*WithLogVolumeOptions) RavenDBServerResource
options...*WithLogVolumeOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithLogVolumeOptions argument.

Name*stringOptional name for the volume. Defaults to a generated name if not provided.
IsReadOnly*boolIndicates whether the volume should be read-only. Defaults to false.
RavenDBServerResource

The IResourceBuilder for the RavenDB server resource.

Returns a handle; failures surface later via Err().