MongoDBServerResource.WithReplicaSet

Method
📦 Aspire.Hosting.MongoDB v17.0.0
type MongoDBServerResource interface {
// ... omitted for brevity
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().

Defined on

This method is defined on the following type: