NAME
Langertha::Skeid::CapacityProbe::Custom - Capacity probe backed by a caller-supplied callback
VERSION
version 0.003
SYNOPSIS
$skeid->add_node(
id => 'weird-1', url => 'http://weird-1/v1', model => 'm',
capacity => {
probe => 'custom',
interval_ms => 1000,
code => sub {
my ($probe) = @_;
my $depth = ask_the_thing(); # must not block
$probe->skeid->set_capacity_reading($probe->node_id,
source => 'custom', used => $depth, limit => 16);
},
},
);
DESCRIPTION
Skeid fronts whatever an operator happens to run, so "any way of finding out how busy a node is" has to be part of the contract rather than something bolted on when the built-ins run out (ADR 0009). The built-in probes are conveniences for the engines we know about.
The callback gets the probe and reports through the same methods as any other probe: set_capacity_reading when it knows, forget_capacity when it does not. It runs on a timer, never on the request path, so it must not block — the whole process waits on it.
code
The callback, called with the probe as its only argument.
poll
Calls "code" with the probe. A callback that dies makes the probe forget its reading, as any failed poll does.
SEE ALSO
Langertha::Skeid::CapacityProbe
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha-skeid/issues.
IRC
Join #langertha 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> https://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.