NAME
WWW::VastAI::Offer - Marketplace offer wrapper returned by Vast.ai searches
VERSION
version 0.001
DESCRIPTION
WWW::VastAI::Offer wraps a single marketplace offer returned by WWW::VastAI::API::Offers. It provides small convenience accessors for common offer fields and a helper to create an instance from the selected offer.
METHODS
ask_contract_id
my $offer_id = $offer->ask_contract_id;
Returns the ask contract identifier used for instance creation. If the payload does not provide a dedicated ask_contract_id, the regular resource id is used as a fallback.
gpu_name
Returns the GPU model for the offer.
num_gpus
Returns the number of GPUs in the offer.
dph_total
Returns the hourly price field from the offer payload.
machine_id
Returns the provider machine identifier.
create_instance
my $instance = $offer->create_instance(%params);
Creates a new WWW::VastAI::Instance via the parent client using this offer's contract ID.
SEE ALSO
WWW::VastAI, WWW::VastAI::API::Offers, WWW::VastAI::Instance
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-www-vastai/issues.
IRC
Join #kubernetes on irc.perl.org or message Getty directly.
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 <torsten@raudssus.de> https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.