Skip to content

Commit

Permalink
docs(mongo-memory-instance-replicamemberconfig): add file
Browse files Browse the repository at this point in the history
  • Loading branch information
hasezoey committed Jun 15, 2022
1 parent 7b0c98e commit 723f8f1
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/interfaces/mongo-memory-instance-opts.md
Expand Up @@ -80,7 +80,7 @@ Set which storage engine to use, uses [`StorageEngine`](#helper-type-storageengi

Typings: `replicaMemberConfig?: ReplicaMemberConfig`

Set custom a custom Replica Member Config, uses [`ReplicaMemberConfig`](TODO).
Set custom a custom Replica Member Config, uses [`ReplicaMemberConfig`](./mongo-memory-instance-replicamemberconfig.md).
Only has a effect when started with [`MongoMemoryReplSet`](../classes/mongo-memory-replset.md).

## Helper Type `StorageEngine`
Expand Down
66 changes: 66 additions & 0 deletions docs/api/interfaces/mongo-memory-instance-replicamemberconfig.md
@@ -0,0 +1,66 @@
---
id: mongo-memory-instance-replicamemberconfig
title: 'ReplicaMemberConfig'
---

API Documentation of `ReplicaMemberConfig`-Interface

## Values

### arbiterOnly

Typings: `arbiterOnly?: boolean`
Default: `false`

Set a member to be a arbiter, see [MongoDB ReplSet Arbiter](https://www.mongodb.com/docs/manual/core/replica-set-arbiter/) and [MongoDB add an Arbiter to the ReplSet](https://www.mongodb.com/docs/manual/tutorial/add-replica-set-arbiter/).

### buildIndexes

Typings: `buildIndexes?: boolean`
Default: `true`

Set whether to automatically build indexes.

### hidden

Typings: `hidden?: boolean`
Default: `true`

Set a the instance to not show up in the command `hello`.

### priority

Typings: `priority?: number`
Default: `1`

Set the priority in becoming a Primary. Higher is more likely. `0` is only for arbiters.

### tags

Typings: `tags?: any`
Default: `null`

Set custom tags for a member, see [MongoDB ReplSet tags](https://www.mongodb.com/docs/manual/tutorial/configure-replica-set-tag-sets/).

### slaveDelay

Typings: `slaveDelay?: number`
Default: `0`

Set how long behind the secondary members should be behind the primary, for more see [MongoDB 4.x Configure a Delayed Replica Set Member](https://www.mongodb.com/docs/v4.2/tutorial/configure-a-delayed-replica-set-member/).
This option is only for MongoDB `4.x`, for `5.0` or higher use [`secondaryDelaySecs`](#secondarydelaysecs).

### secondaryDelaySecs

Typings: `secondaryDelaySecs?: number`
Default: `0`

Set how long behind the secondary members should be behind the primary, for more see [MongoDB Configure a Delayed Replica Set Member](https://www.mongodb.com/docs/manual/tutorial/configure-a-delayed-replica-set-member/).
This option is a for MongoDB `5.0` or higher.

### votes

Typings: `votes?: number`
Default: `1`

Set how many votes this member has for electing a primary. Arbiters only have a static vote of `1`.
1 change: 1 addition & 0 deletions website/sidebars.js
Expand Up @@ -14,6 +14,7 @@ module.exports = {
'api/interfaces/mongo-memory-server-automaticauth',
'api/interfaces/mongo-memory-server-createuser',
'api/interfaces/mongo-memory-instance-opts',
'api/interfaces/mongo-memory-instance-replicamemberconfig',
],
},
guides: {
Expand Down

0 comments on commit 723f8f1

Please sign in to comment.