Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

GarnetResource

Handle
📦 Aspire.Hosting.Garnet v17.0.0

A resource that represents a Garnet resource independent of the hosting model.

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

Properties

propertyConnectionStringExpression*ReferenceExpressionget
Gets the connection string expression for the Garnet server.
ConnectionStringExpression() *ReferenceExpression
propertyHostEndpointReferenceExpressionget
Gets the host endpoint reference for this resource.
Host() EndpointReferenceExpression
propertyPasswordParameterParameterResourceget
Gets the parameter that contains the Garnet server password.
PasswordParameter() ParameterResource
propertyPortEndpointReferenceExpressionget
Gets the port endpoint reference for this resource.
Port() EndpointReferenceExpression
propertyPrimaryEndpointEndpointReferenceget
Gets the primary endpoint for the Garnet server.
PrimaryEndpoint() EndpointReference
propertyResourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
ResourceTypeDisplayName() (string, error)
propertyUriExpression*ReferenceExpressionget
Gets the connection URI expression for the Garnet server.
UriExpression() *ReferenceExpression

Methods

methodWithDataBindMountbuilder
Adds a bind mount for the data folder to a Garnet container resource and enables Garnet persistence.
WithDataBindMount(
source string,
options ...*WithDataBindMountOptions,
) GarnetResource
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*boolA flag that indicates if this is a read-only mount. Setting this to true will disable Garnet persistence. Defaults to false.
GarnetResource

The resource builder.

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

methodWithDataVolumebuilder
Adds a named volume for the data folder to a Garnet container resource and enables Garnet persistence.
WithDataVolume(options ...*WithDataVolumeOptions) GarnetResource
options...*WithDataVolumeOptionsOptional settings, described under Options.

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

Name*stringThe name of the volume. Defaults to an auto-generated name based on the application and resource names.
IsReadOnly*boolA flag that indicates if this is a read-only volume. Setting this to true will disable Garnet persistence. Defaults to false.
GarnetResource

The resource builder.

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

methodWithPersistencebuilder
Configures a Garnet container resource for persistence.
WithPersistence(options ...*WithPersistenceOptions) GarnetResource
options...*WithPersistenceOptionsOptional settings, described under Options.

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

Interval*float64The interval between snapshot exports. Defaults to 60 seconds.
GarnetResource

The resource builder.

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