Hetzner Cloud's API, as the pool autoscaler needs it (#267, orca.pool_scale): make a server, list a pool's, delete one, and the architecture of a server type.
var h = HCloud.from_env() # raises without a token
var got = h.create(spec) # Created: ok, or no stock, or why not
for s in h.servers("orca-pool=lab"): ...
_ = h.delete(s.id) # True if it's gone, already or now
h.arch("cax31") # "arm"
The token is ORCA_HCLOUD_TOKEN, or the secret ORCA_HCLOUD_TOKEN_SECRET
names (orca.control.fetch_secret: ORCA_SECRET_FETCH on a Hetzner
stack); it's sent as a bearer token and never put in an error. A call
isn't retried and times out after 10 s: the scheduler calls these from its
tick and tries again on the next.
ORCA_HCLOUD_ENDPOINT (https://api.hetzner.cloud/v1) is for tests'
fake. Hetzner says a type can't be had in a location now with
resource_unavailable or placement_error, or server_type_unavailable
for one it doesn't offer there: Created.no_stock, which the autoscaler
waits on, apart from any other refusal, which it reports.