Versions in this module Expand all Collapse all v3 v3.0.1 Jul 29, 2022 Changes in this version type Member + func (m *Member) GoString() string v3.0.0 Jul 21, 2022 Changes in this version + const ArbiterState + const DownState + const FatalState + const PrimaryState + const RecoveringState + const RollbackState + const SecondaryState + const ShunnedState + const Startup2State + const StartupState + const UnknownState + var CurrentConfig = currentConfig + var ErrMasterNotConfigured = fmt.Errorf("mongo master not configured") + func Add(session *mgo.Session, members ...Member) error + func BuildInfo(session *mgo.Session) (mgo.BuildInfo, error) + func Initiate(session *mgo.Session, address, name string, tags map[string]string) error + func IsReady(session *mgo.Session) (bool, error) + func MasterHostPort(session *mgo.Session) (string, error) + func Remove(session *mgo.Session, addrs ...string) error + func Set(session mgoSession, members []Member) error + func StepDownPrimary(session *mgo.Session) error + func WaitUntilReady(session *mgo.Session, timeout int) error + type Config struct + Members []Member + Name string + ProtocolVersion int + Term int + Version int + type IsMasterResults struct + Address string + Addresses []string + Arbiter bool + Arbiters []string + IsMaster bool + LocalTime time.Time + PrimaryAddress string + ReplicaSetName string + Secondary bool + func IsMaster(session *mgo.Session) (*IsMasterResults, error) + type Member struct + Address string + Arbiter *bool + BuildIndexes *bool + Hidden *bool + Id int + Priority *float64 + SlaveDelay *time.Duration + Tags map[string]string + Votes *int + func CurrentMembers(session *mgo.Session) ([]Member, error) + type MemberState int + func (state MemberState) String() string + type MemberStatus struct + Address string + ErrMsg string + Healthy bool + Id int + Ping time.Duration + Self bool + State MemberState + Uptime time.Duration + type Status struct + Members []MemberStatus + Name string + func CurrentStatus(session *mgo.Session) (*Status, error) Other modules containing this package github.com/juju/replicaset/v2