healthcheck

package
v1.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoReplsetConfigStr string = "(NotYetInitialized) no replset config has been received"

Functions

func CheckState

func CheckState(rs ReplSetStatus, startupDelaySeconds int64, oplogSize int64) error

func HealthCheckMongodLiveness

func HealthCheckMongodLiveness(ctx context.Context, cnf *db.Config, startupDelaySeconds int64) (_ *mongo.MemberState, err error)

func HealthCheckMongosLiveness

func HealthCheckMongosLiveness(ctx context.Context, cnf *db.Config) (err error)

func MongodReadinessCheck

func MongodReadinessCheck(ctx context.Context, addr string) error

MongodReadinessCheck runs a ping on a pmgo.SessionManager to check server readiness

func MongosReadinessCheck

func MongosReadinessCheck(ctx context.Context, cnf *db.Config) (err error)

Types

type InitialSyncStatus

type InitialSyncStatus interface{}

type OplogRs

type OplogRs struct {
	mongo.OKResponse `bson:",inline"`
	StorageSize      int64 `bson:"storageSize" json:"storageSize"`
}

type ReplSetStatus

type ReplSetStatus struct {
	InitialSyncStatus InitialSyncStatus `bson:"initialSyncStatus" json:"initialSyncStatus"`
	mongo.Status      `bson:",inline"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL