Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

ClickHouseServerResource

Handle
📦 Aspire.Hosting.ClickHouse v13.5.3

A resource that represents a ClickHouse container.

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

Properties

propertyConnectionStringExpression*ReferenceExpressionget
Gets the connection string expression for the ClickHouse server.
ConnectionStringExpression() *ReferenceExpression
propertyDatabasesmap[string]stringget
A dictionary where the key is the resource name and the value is the database name.
Databases() (map[string]string, error)
propertyHostEndpointReferenceExpressionget
Gets the host expression for this resource.
Host() EndpointReferenceExpression
propertyPasswordParameterParameterResourceget
Gets the parameter that contains the ClickHouse server password.
PasswordParameter() ParameterResource
propertyPortEndpointReferenceExpressionget
Gets the port expression for this resource.
Port() EndpointReferenceExpression
propertyPrimaryEndpointEndpointReferenceget
Gets the primary endpoint for the ClickHouse server.
PrimaryEndpoint() EndpointReference
propertyUserNameParameterParameterResourceget
Gets the parameter that contains the ClickHouse server username.
UserNameParameter() ParameterResource
propertyUserNameReference*ReferenceExpressionget
Gets a reference to the user name for the ClickHouse server.
UserNameReference() *ReferenceExpression

Methods

methodAddDatabasebuilder
Adds a ClickHouse database to the application model.
AddDatabase(
name string,
options ...*AddDatabaseOptions,
) ClickHouseDatabaseResource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
options...*AddDatabaseOptionsOptional settings, described under Options.

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

DatabaseName*stringThe name of the database. If not provided, this defaults to the same value as name.
ClickHouseDatabaseResource

The ClickHouse database resource.

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

methodWithDataBindMountbuilder
Adds a bind mount for the data folder to a ClickHouse container resource.
WithDataBindMount(
source string,
options ...*WithDataBindMountOptions,
) ClickHouseServerResource
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.
ClickHouseServerResource

The resource builder.

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

methodWithDataVolumebuilder
Adds a named volume for the data folder to a ClickHouse container resource.
WithDataVolume(options ...*WithDataVolumeOptions) ClickHouseServerResource
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.
ClickHouseServerResource

The resource builder.

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