| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Beam::Wire::Event::ConfigService; |
|
2
|
|
|
|
|
|
|
our $VERSION = '1.023'; |
|
3
|
|
|
|
|
|
|
# ABSTRACT: Event fired when configuring a new service |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
#pod =head1 SYNOPSIS |
|
6
|
|
|
|
|
|
|
#pod |
|
7
|
|
|
|
|
|
|
#pod my $wire = Beam::Wire->new( ... ); |
|
8
|
|
|
|
|
|
|
#pod $wire->on( configure_service => sub { |
|
9
|
|
|
|
|
|
|
#pod my ( $event ) = @_; |
|
10
|
|
|
|
|
|
|
#pod print "Configuring service named " . $event->service_name; |
|
11
|
|
|
|
|
|
|
#pod } ); |
|
12
|
|
|
|
|
|
|
#pod |
|
13
|
|
|
|
|
|
|
#pod =head1 DESCRIPTION |
|
14
|
|
|
|
|
|
|
#pod |
|
15
|
|
|
|
|
|
|
#pod This event is fired when a service is configured. See |
|
16
|
|
|
|
|
|
|
#pod L<Beam::Wire/configure_service>. |
|
17
|
|
|
|
|
|
|
#pod |
|
18
|
|
|
|
|
|
|
#pod =head1 ATTRIBUTES |
|
19
|
|
|
|
|
|
|
#pod |
|
20
|
|
|
|
|
|
|
#pod This class inherits from L<Beam::Event> and adds the following attributes. |
|
21
|
|
|
|
|
|
|
#pod |
|
22
|
|
|
|
|
|
|
#pod =cut |
|
23
|
|
|
|
|
|
|
|
|
24
|
24
|
|
|
24
|
|
172
|
use Moo; |
|
|
24
|
|
|
|
|
52
|
|
|
|
24
|
|
|
|
|
226
|
|
|
25
|
24
|
|
|
24
|
|
9143
|
use Types::Standard qw( HashRef Str ); |
|
|
24
|
|
|
|
|
64
|
|
|
|
24
|
|
|
|
|
209
|
|
|
26
|
|
|
|
|
|
|
extends 'Beam::Event'; |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
#pod =attr emitter |
|
29
|
|
|
|
|
|
|
#pod |
|
30
|
|
|
|
|
|
|
#pod The container that is listening for the event. |
|
31
|
|
|
|
|
|
|
#pod |
|
32
|
|
|
|
|
|
|
#pod =attr service_name |
|
33
|
|
|
|
|
|
|
#pod |
|
34
|
|
|
|
|
|
|
#pod The name of the service being configured. |
|
35
|
|
|
|
|
|
|
#pod |
|
36
|
|
|
|
|
|
|
#pod =cut |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has service_name => ( |
|
39
|
|
|
|
|
|
|
is => 'ro', |
|
40
|
|
|
|
|
|
|
isa => Str, |
|
41
|
|
|
|
|
|
|
); |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
#pod =attr config |
|
44
|
|
|
|
|
|
|
#pod |
|
45
|
|
|
|
|
|
|
#pod The normalized configuration for the service (see L<Beam::Wire/normalize_config>). |
|
46
|
|
|
|
|
|
|
#pod |
|
47
|
|
|
|
|
|
|
#pod =cut |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has config => ( |
|
50
|
|
|
|
|
|
|
is => 'ro', |
|
51
|
|
|
|
|
|
|
isa => HashRef, |
|
52
|
|
|
|
|
|
|
); |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=pod |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=encoding UTF-8 |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 NAME |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Beam::Wire::Event::ConfigService - Event fired when configuring a new service |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 VERSION |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
version 1.023 |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
my $wire = Beam::Wire->new( ... ); |
|
73
|
|
|
|
|
|
|
$wire->on( configure_service => sub { |
|
74
|
|
|
|
|
|
|
my ( $event ) = @_; |
|
75
|
|
|
|
|
|
|
print "Configuring service named " . $event->service_name; |
|
76
|
|
|
|
|
|
|
} ); |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
This event is fired when a service is configured. See |
|
81
|
|
|
|
|
|
|
L<Beam::Wire/configure_service>. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This class inherits from L<Beam::Event> and adds the following attributes. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 emitter |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
The container that is listening for the event. |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 service_name |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
The name of the service being configured. |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 config |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
The normalized configuration for the service (see L<Beam::Wire/normalize_config>). |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 AUTHORS |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=over 4 |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item * |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Doug Bell <preaction@cpan.org> |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item * |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Al Newkirk <anewkirk@ana.io> |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=back |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
This software is copyright (c) 2018 by Doug Bell. |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
118
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |