Skip to content

Commit

Permalink
Merge branch 'v3-api-breaking-changes' into PMM-12913-use-regular-htt…
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff authored Feb 29, 2024
2 parents 0387664 + b77f829 commit 7efe063
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions managed/services/agents/versioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func (*Mysqld) isSoftware() {}
// Name returns the software name for Mysqld.
func (*Mysqld) Name() models.SoftwareName { return models.MysqldSoftwareName }

// GetVersionRequest constructs a request for MySQL software.
func (*Mysqld) GetVersionRequest() *agentv1.GetVersionsRequest_Software {
return &agentv1.GetVersionsRequest_Software{
Software: &agentv1.GetVersionsRequest_Software_Mysqld{},
Expand All @@ -75,6 +76,7 @@ func (*Xtrabackup) isSoftware() {}
// Name returns the software name for Xtrabackup.
func (*Xtrabackup) Name() models.SoftwareName { return models.XtrabackupSoftwareName }

// GetVersionRequest constructs a request for XtraBackup software.
func (*Xtrabackup) GetVersionRequest() *agentv1.GetVersionsRequest_Software {
return &agentv1.GetVersionsRequest_Software{
Software: &agentv1.GetVersionsRequest_Software_Xtrabackup{},
Expand All @@ -89,6 +91,7 @@ func (*Xbcloud) isSoftware() {}
// Name returns the software name for Qpress.
func (*Xbcloud) Name() models.SoftwareName { return models.XbcloudSoftwareName }

// GetVersionRequest constructs a request for Xbcloud software.
func (*Xbcloud) GetVersionRequest() *agentv1.GetVersionsRequest_Software {
return &agentv1.GetVersionsRequest_Software{
Software: &agentv1.GetVersionsRequest_Software_Xbcloud{},
Expand All @@ -103,6 +106,7 @@ func (*Qpress) isSoftware() {}
// Name returns the software name for Qpress.
func (*Qpress) Name() models.SoftwareName { return models.QpressSoftwareName }

// GetVersionRequest constructs a request for Qpress software.
func (*Qpress) GetVersionRequest() *agentv1.GetVersionsRequest_Software {
return &agentv1.GetVersionsRequest_Software{
Software: &agentv1.GetVersionsRequest_Software_Qpress{},
Expand All @@ -117,6 +121,7 @@ func (*MongoDB) isSoftware() {}
// Name returns the software name for MongoDB.
func (*MongoDB) Name() models.SoftwareName { return models.MongoDBSoftwareName }

// GetVersionRequest constructs a request for MongoDB software.
func (*MongoDB) GetVersionRequest() *agentv1.GetVersionsRequest_Software {
return &agentv1.GetVersionsRequest_Software{
Software: &agentv1.GetVersionsRequest_Software_Mongod{},
Expand All @@ -131,16 +136,19 @@ func (*PBM) isSoftware() {}
// Name returns the software name for PBM.
func (*PBM) Name() models.SoftwareName { return models.PBMSoftwareName }

// GetVersionRequest constructs a request for PBM software.
func (*PBM) GetVersionRequest() *agentv1.GetVersionsRequest_Software {
return &agentv1.GetVersionsRequest_Software{
Software: &agentv1.GetVersionsRequest_Software_Pbm{},
}
}

// getMysqlSoftwareList returns list of software required for MySQL backups.
func getMysqlSoftwareList() []Software {
return []Software{&Mysqld{}, &Xtrabackup{}, &Xbcloud{}, &Qpress{}}
}

// getMongodbSoftwareList returns list of software required for MongoDB backups.
func getMongodbSoftwareList() []Software {
return []Software{&MongoDB{}, &PBM{}}
}
Expand Down

0 comments on commit 7efe063

Please sign in to comment.