MCPcopy Create free account
hub / github.com/barnybug/cli53 / waitForChange

Function waitForChange

util.go:355–372  ·  view source on GitHub ↗
(ctx context.Context, change *route53types.ChangeInfo)

Source from the content-addressed store, hash-verified

353}
354
355func waitForChange(ctx context.Context, change *route53types.ChangeInfo) {
356 fmt.Printf("Waiting for sync")
357 for {
358 req := route53.GetChangeInput{Id: change.Id}
359 resp, err := r53.GetChange(ctx, &req)
360 fatalIfErr(err)
361 if resp.ChangeInfo.Status == route53types.ChangeStatusInsync {
362 fmt.Println("\nCompleted")
363 break
364 } else if resp.ChangeInfo.Status == route53types.ChangeStatusPending {
365 fmt.Printf(".")
366 } else {
367 fmt.Printf("\nFailed: %s\n", resp.ChangeInfo.Status)
368 break
369 }
370 time.Sleep(1 * time.Second)
371 }
372}
373
374// Use shortened form of name with origin removed/abbreviated.
375func shortenName(name, origin string) string {

Callers 5

deleteRecordSetsFunction · 0.85
importBindFunction · 0.85
createRecordsFunction · 0.85
deleteRecordFunction · 0.85
instancesFunction · 0.85

Calls 1

fatalIfErrFunction · 0.70

Tested by

no test coverage detected