::Util::Accessor qw(
health_check
health_check_paths
allowed_params
);
use Carp;
use JSON ();
use Scalar::Util ();
sub new {
my ( $class, @args ) = @_;
my %params = @args
alth_check_response {
my ( $self, $result, $req ) = @_;
my $json = JSON->new->allow_blessed->convert_blessed->utf8;
$json->canonical->pretty
if $req and exists $req->query_paramete
| '' ) eq 'OK'
? 200 : 503,
[ 'Content-Type' => 'application/json; charset=utf-8' ],
[ $json->encode($result) ] ];
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Plack