Documentation
¶
Index ¶
- type Client
- func (c *Client) CheckAPI() error
- func (c *Client) CreateDroplet(name, region, size string) (types.Droplet, string, error)
- func (c *Client) ListDroplets() ([]types.Droplet, error)
- func (c *Client) RemoveDroplet(id int) error
- func (c *Client) WaitUntilReady(droplet *types.Droplet, actionHREF string) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages droplets on DigitalOcean.
func (*Client) CreateDroplet ¶
CreateDroplet creates a new droplet and returns it along with the action HREF for monitoring.
func (*Client) ListDroplets ¶
ListDroplets lists all droplets with the configured tag.
func (*Client) RemoveDroplet ¶
RemoveDroplet deletes a droplet by ID.
func (*Client) WaitUntilReady ¶
WaitUntilReady polls until the droplet is active and SSH-reachable. It uses the Actions API to wait for the droplet to become active, then switches to a tighter polling loop for SSH readiness.
type Option ¶
Option represents a CLI alias mapped to a provider-specific value.
func RegionOptions ¶
func RegionOptions() []Option
RegionOptions returns all region alias-to-slug mappings.
Click to show internal directories.
Click to hide internal directories.