ControlFreak
view release on metacpan or search on metacpan
Term::ANSIColor: 0
requires:
AnyEvent: 5.202
EV: 0
Find::Lib: 0
JSON::XS: 0
Log::Log4perl: 0
Object::Tiny: 0
Params::Util: 0
Pod::Usage: 0
Try::Tiny: 0
perl: 5.8.1
resources:
license: http://dev.perl.org/licenses/
repository: git://github.com/yannk/ControlFreak.git
version: 1.0.0
Makefile.PL view on Meta::CPAN
use inc::Module::Install;
name 'ControlFreak';
all_from 'lib/ControlFreak.pm';
include 'Module:AutoInstall';
requires 'Find::Lib';
requires 'Pod::Usage';
requires 'Try::Tiny';
requires 'Object::Tiny';
requires 'Params::Util';
requires 'Log::Log4perl';
requires 'EV';
requires 'AnyEvent' => '5.202';
requires 'JSON::XS';
build_requires 'Test::More';
build_requires 'Test::Exception';
build_requires 'Test::Deep';
lib/ControlFreak/Logger.pm view on Meta::CPAN
package ControlFreak::Logger;
use strict;
use warnings;
use Carp;
use Log::Log4perl();
use Object::Tiny qw{ config_file };
use Params::Util qw{ _STRING };
use Try::Tiny;
our $CURRENT_SVC_PID;
Log::Log4perl::Layout::PatternLayout::add_global_cspec(
'S', sub { $ControlFreak::Logger::CURRENT_SVC_PID || "-" },
);
sub new {
my $class = shift;
my $logger = $class->SUPER::new(@_);
lib/ControlFreak/Proxy.pm view on Meta::CPAN
use AnyEvent::Util();
use Carp;
use ControlFreak::Util;
use Fcntl qw(F_GETFD F_SETFD FD_CLOEXEC);
use JSON::XS;
use Object::Tiny qw{ name cmd pid is_running env auto };
use Params::Util qw{ _ARRAY _STRING };
use POSIX 'SIGTERM';
use Scalar::Util();
use Try::Tiny;
=pod
=head1 NAME
ControlFreak::Proxy - Delegate some control to an intermediary process.
=head1 DESCRIPTION
There are some cases where you want some services managed in a special way,
lib/ControlFreak/Proxy/Process.pm view on Meta::CPAN
package ControlFreak::Proxy::Process;
use strict;
use warnings;
use JSON::XS;
use Try::Tiny;
use POSIX 'SIGTERM';
use IO::Select;
$SIG{PIPE} = 'IGNORE';
=head1 NAME
ControlFreak::Proxy::Process - The Perl implementation of a proxy process.
=head1 DESCRIPTION
lib/ControlFreak/Service.pm view on Meta::CPAN
use AnyEvent '5.202';
use AnyEvent::Util();
use AnyEvent::Handle();
use Carp;
use ControlFreak::Util();
use Data::Dumper();
use JSON::XS;
use Params::Util qw{ _NUMBER _STRING _IDENTIFIER _ARRAY _POSINT };
use POSIX qw{ SIGTERM SIGKILL };
use Try::Tiny;
use constant DEFAULT_STARTWAIT_SECS => 1;
use constant DEFAULT_STOPWAIT_SECS => 2;
use constant DEFAULT_MAX_RETRIES => 8;
use constant BASE_BACKOFF_DELAY => 0.3;
use Object::Tiny qw{
name
desc
proxy
lib/ControlFreak/Tutorial.pod view on Meta::CPAN
hasn't been tested thoroughly with other Event loops.
=item * Log4perl
This is the logging backend of ControlFreak.
=item * JSON::XS
=item * Object::Tiny
=item * Try::Tiny
=item * Params::Util
=back
=head2 cpanm
Other instructions will come later, when ControlFreak will be on CPAN.
# install cpanm (see App::cpanminus documentation for details)
( run in 0.821 second using v1.01-cache-2.11-cpan-05444aca049 )