version

package
v1.8.1-0...-0157f87 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BreakingChangesMap = map[defs.BackupType][]string{
	defs.LogicalBackup:     {"1.5.0"},
	defs.IncrementalBackup: {"2.1.0"},
	defs.PhysicalBackup:    {},
}

BreakingChangesMap map of versions introduced breaking changes to respective backup defs. !!! Versions should be sorted in the ascending order.

Functions

func CompatibleWith

func CompatibleWith(v string, breakingv []string) bool

CompatibleWith checks if a given version is compatible the current one. It is not compatible if the current is crossed the breaking ponit (version >= breakingVersion) and the given isn't (v < breakingVersion)

func GetFCV

func GetFCV(ctx context.Context, m *mongo.Client) (string, error)

func HasFilelistFile

func HasFilelistFile(ver string) bool

func IsLegacyArchive

func IsLegacyArchive(ver string) bool

func IsLegacyBackupOplog

func IsLegacyBackupOplog(ver string) bool

Types

type FeatureSupport

type FeatureSupport MongoVersion

func (FeatureSupport) BackupType

func (f FeatureSupport) BackupType(t defs.BackupType) error

func (FeatureSupport) FullPhysicalBackup

func (f FeatureSupport) FullPhysicalBackup() bool

func (FeatureSupport) IncrementalPhysicalBackup

func (f FeatureSupport) IncrementalPhysicalBackup() bool

func (FeatureSupport) PBMSupport

func (f FeatureSupport) PBMSupport() error

type Info

type Info struct {
	Version   string `json:"Version"`
	Platform  string `json:"Platform"`
	GitCommit string `json:"GitCommit"`
	GitBranch string `json:"GitBranch"`
	BuildTime string `json:"BuildTime"`
	GoVersion string `json:"GoVersion"`
}

func Current

func Current() Info

func (Info) All

func (i Info) All(format string) string

func (Info) Short

func (i Info) Short() string

func (Info) String

func (i Info) String() string

type MongoVersion

type MongoVersion struct {
	PSMDBVersion  string `bson:"psmdbVersion,omitempty"`
	VersionString string `bson:"version"`
	Version       []int  `bson:"versionArray"`
}

func GetMongoVersion

func GetMongoVersion(ctx context.Context, m *mongo.Client) (MongoVersion, error)

func (MongoVersion) IsConfigShardSupported

func (v MongoVersion) IsConfigShardSupported() bool

func (MongoVersion) IsShardedTimeseriesSupported

func (v MongoVersion) IsShardedTimeseriesSupported() bool

func (MongoVersion) Major

func (v MongoVersion) Major() int

func (MongoVersion) String

func (v MongoVersion) String() string

Jump to

Keyboard shortcuts

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