File Coverage

blib/lib/App/EventStreamr/Internal/API.pm
Criterion Covered Total %
statement 14 21 66.6
branch 0 4 0.0
condition n/a
subroutine 6 8 75.0
pod n/a
total 20 33 60.6


line stmt bran cond sub pod time code
1             package App::EventStreamr::Internal::API;
2 1     1   15970 use Method::Signatures;
  1         48675  
  1         7  
3 1     1   329 use FindBin '$Bin';
  1         1  
  1         96  
4 1     1   432 use Moo;
  1         6108  
  1         4  
5 1     1   1464 use namespace::clean;
  1         3034  
  1         5  
6              
7             # ABSTRACT: An EventStreamr API Process
8              
9             our $VERSION = '0.3'; # VERSION: Generated by DZP::OurPkg:Version
10              
11              
12             extends 'App::EventStreamr::Process';
13              
14             has 'cmd' => ( is => 'ro', default => sub { "plackup -s Twiggy -p 3000 $Bin/eventstreamr-api.pl --daemon --environment production" } );
15             has 'cmd_regex' => ( is => 'ro', default => sub { "\\/bin\\/plackup.*" } );
16             has 'id' => ( is => 'ro', default => sub { 'api' } );
17             has 'type' => ( is => 'ro', default => sub { 'internal' } );
18              
19             # We're special, we should always be running
20 1 0   1   1059 method _run() {
  0     0      
  0            
21 0           $self->{config}{control}{$self->{id}}{run} = 1;
22 0           return 1;
23             }
24              
25             # And we shouldn't be restarted
26 1 0   1   433 method _restart() {
  0     0      
  0            
27 0           return 0;
28             }
29              
30             1;
31              
32             __END__
33              
34             =pod
35              
36             =encoding UTF-8
37              
38             =head1 NAME
39              
40             App::EventStreamr::Internal::API - An EventStreamr API Process
41              
42             =head1 VERSION
43              
44             version 0.3
45              
46             =head1 SYNOPSIS
47              
48             This manages the internal EventStreamr API
49              
50             =head1 DESCRIPTION
51              
52             This largely extends L<App::EventStreamr::Process>, provides
53             default cmds that can be overridden in the configuration.
54              
55             =head1 AUTHOR
56              
57             Leon Wright < techman@cpan.org >
58              
59             =head1 COPYRIGHT AND LICENSE
60              
61             This software is Copyright (c) 2014 by Leon Wright.
62              
63             This is free software, licensed under:
64              
65             The GNU Affero General Public License, Version 3, November 2007
66              
67             =cut