NAME

Net::Async::Hetzner - Async Hetzner API clients for IO::Async

VERSION

version 0.002

SYNOPSIS

use IO::Async::Loop;
use Net::Async::Hetzner::Cloud;

my $loop = IO::Async::Loop->new;

my $cloud = Net::Async::Hetzner::Cloud->new(
    token => $ENV{HETZNER_API_TOKEN},
);
$loop->add($cloud);

# Future-based API - all methods return Futures
my $servers = $cloud->get('/servers')->get;

$cloud->post('/servers', {
    name        => 'my-server',
    server_type => 'cx22',
    image       => 'debian-12',
    location    => 'fsn1',
})->then(sub {
    my ($data) = @_;
    print "Created: $data->{server}{name}\n";
    return Future->done;
})->get;

# Robot API
use Net::Async::Hetzner::Robot;

my $robot = Net::Async::Hetzner::Robot->new(
    user     => $ENV{HETZNER_ROBOT_USER},
    password => $ENV{HETZNER_ROBOT_PASSWORD},
);
$loop->add($robot);

my $servers = $robot->get('/server')->get;

DESCRIPTION

Net::Async::Hetzner provides async clients for Hetzner APIs built on IO::Async. All HTTP methods return Future objects for non-blocking operation.

Request building, authentication, and response parsing are delegated to WWW::Hetzner, so the same JSON handling, error messages, and logging are available.

Available Clients

SEE ALSO

Net::Async::Hetzner::Cloud, Net::Async::Hetzner::Robot, WWW::Hetzner, IO::Async, Future

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-net-async-hetzner/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudssus.de>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.