Versions in this module Expand all Collapse all v0 v0.0.2 Mar 6, 2018 v0.0.1 Feb 13, 2018 Changes in this version + const Unknown + const UnsetRTT + type Addr string + func (a Addr) Canonicalize() Addr + func (a Addr) Network() string + func (a Addr) String() string + type Cluster struct + Kind ClusterKind + Servers []*Server + func (i *Cluster) Server(addr Addr) (*Server, bool) + type ClusterDiff struct + AddedServers []*Server + RemovedServers []*Server + func DiffCluster(old, new *Cluster) *ClusterDiff + type ClusterKind uint32 + const ReplicaSet + const ReplicaSetNoPrimary + const ReplicaSetWithPrimary + const Sharded + const Single + func (kind ClusterKind) String() string + type Conn struct + ID string + type FSM struct + SetName string + func NewFSM() *FSM + func (fsm *FSM) Apply(s *Server) error + type Range struct + Max int32 + Min int32 + func NewRange(min int32, max int32) Range + func (r *Range) Includes(i int32) bool + func (r *Range) String() string + type Server struct + Addr Addr + AverageRTT time.Duration + AverageRTTSet bool + CanonicalAddr Addr + ElectionID objectid.ObjectID + GitVersion string + HeartbeatInterval time.Duration + Kind ServerKind + LastError error + LastUpdateTime time.Time + LastWriteTime time.Time + MaxBatchCount uint16 + MaxDocumentSize uint32 + MaxMessageSize uint32 + Members []Addr + ReadOnly bool + SetName string + SetVersion uint32 + Tags TagSet + Version Version + WireVersion *Range + func BuildServer(addr Addr, isMasterResult *internal.IsMasterResult, ...) *Server + func (i *Server) SetAverageRTT(rtt time.Duration) + type ServerKind uint32 + const Mongos + const RSArbiter + const RSGhost + const RSMember + const RSPrimary + const RSSecondary + const Standalone + func (kind ServerKind) String() string + type Tag struct + Name string + Value string + type TagSet []Tag + func NewTagSetFromMap(m map[string]string) TagSet + func NewTagSetsFromMaps(maps []map[string]string) []TagSet + func (ts TagSet) Contains(name, value string) bool + func (ts TagSet) ContainsAll(other []Tag) bool + type Version struct + Desc string + Parts []uint8 + func (v *Version) AtLeast(other ...uint8) bool + func (v *Version) String() string