CloudMigrations: Send local events to gms during the migration process (#90637)
* add gms client function * add timeout config for endpoint * report events to gms * fix lint error * clean up report calls and make sure reports all have local ids * extra validation * improve error logging and fix url
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package gmsclient
|
||||
|
||||
import "time"
|
||||
|
||||
type MigrateDataType string
|
||||
|
||||
const (
|
||||
@@ -48,3 +50,21 @@ type MigrateDataResponseItemDTO struct {
|
||||
type CreateSnapshotUploadUrlResponseDTO struct {
|
||||
UploadUrl string `json:"uploadUrl"`
|
||||
}
|
||||
|
||||
type EventRequestDTO struct {
|
||||
LocalID string `json:"migrationClientId"`
|
||||
Event LocalEventType `json:"event"`
|
||||
Error string `json:"error"`
|
||||
DurationIfFinished time.Duration `json:"duration"`
|
||||
}
|
||||
|
||||
type LocalEventType string
|
||||
|
||||
const (
|
||||
EventConnect LocalEventType = "connect"
|
||||
EventDisconnect LocalEventType = "disconnect"
|
||||
EventStartBuildingSnapshot LocalEventType = "start_building_snapshot"
|
||||
EventDoneBuildingSnapshot LocalEventType = "done_building_snapshot"
|
||||
EventStartUploadingSnapshot LocalEventType = "start_uploading_snapshot"
|
||||
EventDoneUploadingSnapshot LocalEventType = "done_uploading_snapshot"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user