Closed 7fELF closed 2 years ago
// test code res, err := exo.GetDatabaseMigrationStatus(ctx, "ch-gva-2", "test1") if err != nil { log.Fatal(err) } spew.Dump(res) // result test1 (*v2.DatabaseMigrationStatus)(0xc0002b6040)({ Details: ([]v2.DatabaseMigrationStatusDetails) { }, Error: (*string)(0xc0004bc290)((len=54) "Failed to run query on source db: 'connection refused'"), MasterLastIoSecondsAgo: (*int64)(<nil>), MasterLinkStatus: (*v2.DatabaseMigrationRedisMasterLinkStatus)(<nil>), Method: (*string)(0xc0004bc2b0)(""), Status: (*string)(0xc0004bc2a0)((len=4) "done") }) // result test2 (*v2.DatabaseMigrationStatus)(0xc000120100)({ Details: ([]v2.DatabaseMigrationStatusDetails) (len=1 cap=1) { (v2.DatabaseMigrationStatusDetails) { DBname: (*string)(0xc0004c22b0)((len=9) "defaultdb"), Error: (*string)(<nil>), Method: (*string)(0xc0004c22d0)((len=7) "pg_dump"), Status: (*v2.DatabaseMigrationStatusDetailsStatus)(0xc0004c22c0)((len=4) "done") } }, Error: (*string)(<nil>), MasterLastIoSecondsAgo: (*int64)(<nil>), MasterLinkStatus: (*v2.DatabaseMigrationRedisMasterLinkStatus)(<nil>), Method: (*string)(0xc0004c22f0)((len=7) "pg_dump"), Status: (*string)(0xc0004c22e0)((len=4) "done") })
This pull request has been linked to Shortcut Story #40702: [CLI/DBaaS]: implement migration status command.