Categorygithub.com/scalingo/replicaset
modulepackage
0.0.0-20190208144327-6bd6ef908f67
Repository: https://github.com/scalingo/replicaset.git
Documentation: pkg.go.dev

# README

juju/replicaset

This package provides convenience functions and structures for creating and managing MongoDB replica sets via the mgo driver.

# Functions

Add adds the given members to the session's replica set.
CurrentMembers returns the current members of the replica set.
CurrentStatus returns the status of the replica set for the given session.
Initiate sets up a replica set with the given replica set name with the single given member.
IsMaster returns information about the configuration of the node that the given session is connected to.
IsReady checks on the status of all members in the replicaset associated with the provided session.
MasterHostPort returns the "address:port" string for the primary mongo server in the replicaset.
Remove removes members with the given addresses from the replica set.
Set changes the current set of replica set members.
StepDownPrimary asks the current mongo primary to step down.
WaitUntilReady waits until all members of the replicaset are ready.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
MaxPeers defines the maximum number of peers that mongo supports.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

CurrentConfig returns the Config for the given session's replica set.
No description provided by the author

# Structs

Config is the document stored in mongodb that defines the servers in the replica set.
Config reports information about the configuration of a given mongo node.
Member holds configuration information for a replica set member.
Status holds the status of a replica set member returned from replSetGetStatus.
Status holds data about the status of members of the replica set returned from replSetGetStatus See http://docs.mongodb.org/manual/reference/command/replSetGetStatus/#dbcmd.replSetGetStatus.

# Type aliases

MemberState represents the state of a replica set member.