Documentation ¶
Index ¶
- Constants
- Variables
- func CheckState(rs ReplSetStatus, startupDelaySeconds int64, oplogSize int64) error
- func HealthCheckMongodLiveness(ctx context.Context, cnf *db.Config, startupDelaySeconds int64) (_ *mongo.MemberState, err error)
- func HealthCheckMongosLiveness(ctx context.Context, cnf *db.Config) (err error)
- func MongodReadinessCheck(ctx context.Context, addr string) error
- func MongosReadinessCheck(ctx context.Context, cnf *db.Config) (err error)
- type InitialSyncStatus
- type OplogRs
- type ReplSetStatus
- type ServerStatus
- type State
Constants ¶
View Source
const (
Version = "0.5.0"
)
Variables ¶
View Source
var ErrNoReplsetConfigStr string = "(NotYetInitialized) no replset config has been received"
View Source
var OkMemberStates = []mongo.MemberState{ mongo.MemberStatePrimary, mongo.MemberStateSecondary, mongo.MemberStateRecovering, mongo.MemberStateArbiter, mongo.MemberStateStartup2, mongo.MemberStateRollback, }
OkMemberStates is a slice of acceptable replication member states
Functions ¶
func CheckState ¶ added in v1.10.0
func CheckState(rs ReplSetStatus, startupDelaySeconds int64, oplogSize int64) error
func MongodReadinessCheck ¶ added in v1.15.0
ReadinessCheck runs a ping on a pmgo.SessionManager to check server readiness
Types ¶
type InitialSyncStatus ¶
type InitialSyncStatus interface{}
type ReplSetStatus ¶
type ReplSetStatus struct { mongo.Status `bson:",inline"` InitialSyncStatus InitialSyncStatus `bson:"initialSyncStatus" json:"initialSyncStatus"` }
type ServerStatus ¶
type State ¶
type State int
func HealthCheck ¶
func HealthCheck(client mongo.Client, okMemberStates []mongo.MemberState) (State, *mongo.MemberState, error)
HealthCheck checks the replication member state of the local MongoDB member
Click to show internal directories.
Click to hide internal directories.