Skip to content
DocsTry Aspire
DocsTry

GarnetResource

Handle
📦 Aspire.Hosting.Garnet v13.4.0
interface GarnetResource
extends IComputeResource,
IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly host: EndpointReferenceExpression;
readonly passwordParameter: ParameterResource;
readonly port: EndpointReferenceExpression;
readonly primaryEndpoint: EndpointReference;
readonly uriExpression: ReferenceExpression;
withDataBindMount(
source: string,
isReadOnly?: boolean): GarnetResource;
withDataVolume(
name?: string,
isReadOnly?: boolean): GarnetResource;
withPersistence(interval?: timespan): GarnetResource;
}

Properties

propertyconnectionStringExpressionReferenceExpressionget
Gets the connection string expression for the Garnet server.
propertyhostEndpointReferenceExpressionget
Gets the host endpoint reference for this resource.
propertypasswordParameterParameterResourceget
Gets the parameter that contains the Garnet server password.
propertyportEndpointReferenceExpressionget
Gets the port endpoint reference for this resource.
propertyprimaryEndpointEndpointReferenceget
Gets the primary endpoint for the Garnet server.
propertyuriExpressionReferenceExpressionget
Gets the connection URI expression for the Garnet server.

Methods

methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a Garnet container resource and enables Garnet persistence.
withDataBindMount(
source: string,
isReadOnly?: boolean): GarnetResource
sourcestring
isReadOnlybooleanoptional= False
GarnetResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to a Garnet container resource and enables Garnet persistence.
withDataVolume(
name?: string,
isReadOnly?: boolean): GarnetResource
namestringoptional
isReadOnlybooleanoptional= False
GarnetResource
methodwithPersistencebuilder
Configures a Garnet container resource for persistence.
withPersistence(interval?: timespan): GarnetResource
intervaltimespanoptional
GarnetResource