util.WaitForActive()

Generated on 5 Nov 2026 from godo version v1.236.0

Usage

util.WaitForActive(ctx context.Context, client *godo.Client, monitorURI string) error

Description

WaitForActive waits for a droplet to become active

Parameters

client *godo.Client required
monitorURI string required

Returns

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Request Sample

Show Request Sample
package main

import (
	"context"
	"log"
	"os"

	"github.com/digitalocean/godo"
	"github.com/digitalocean/godo/util"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	err := util.WaitForActive(ctx, client, "<your-monitor-uri>")
	if err != nil {
		log.Fatal(err)
	}
}

More Information

See the Go package documentation for the source of this function.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.