AC-Yenta
view release on metacpan or search on metacpan
lib/AC/Yenta/Kibitz/Store/Server.pm view on Meta::CPAN
};
if(my $e = $@){
my $enc = $proto->{data_encrypted} ? ' (encrypted)' : '';
problem("cannot decode request: peer: $io->{peerip} $enc, $e");
$io->shut();
return;
}
unless( conf_map( $req->{datum}{map} ) ){
problem("distribute request for unknown map '$req->{datum}{map}' - $io->{info}");
_reply_error($io, $proto, 404, 'Map Not Found');
return;
}
my $v = $req->{datum};
# do we already have ?
my $want = store_want( $v->{map}, $v->{shard}, $v->{key}, $v->{version} );
if( $want ){
# put
lib/AC/Yenta/Stats.pm view on Meta::CPAN
sub _done {
my $io = shift;
$io->shut();
}
################################################################
sub http_notfound {
my $url = shift;
return ("404 NOT FOUND\nThe requested url /$url was not found on this server.\nSo sorry.\n\n", 404, "Not Found");
}
sub http_load {
return sprintf("loadave: %0.4f\n\n", loadave());
}
sub http_status {
my $status = AC::Yenta::NetMon::status_dom('public');
return "status: OK\n\n" if $status == 200;
( run in 2.033 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )