Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithReplicaSet

Method
📦 Aspire.Hosting.MongoDB v17.0.0
func (MongoDBServerResource) WithReplicaSet(options ...*WithReplicaSetOptions) MongoDBServerResource

Signature

methodWithReplicaSetbuilder
Configures and initializes the MongoDB server as a single-member replica set for local development.
WithReplicaSet(options ...*WithReplicaSetOptions) MongoDBServerResource
options...*WithReplicaSetOptionsOptional settings, described under Options.

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

Name*stringThe replica set name. Defaults to the resource name, or the name previously configured by this method.
MongoDBServerResource

The resource builder.

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

Applies to

This method applies to the following types: