The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Juno::Check::TCP - A TCP check for Juno

VERSION

version 0.010

DESCRIPTION

    my $juno = Juno->new(
        hosts  => [ 'tom', 'jerry' ],
        checks => {
            TCP => {
                on_success => sub {...},
                on_fail    => sub {...},
            },
        }
    );

ATTRIBUTES

hosts

An arrayref of hosts to check, overriding the default given to Juno.pm.

    my $juno = Juno->new(
        hosts  => [ 'Tom', 'Jerry' ],
        checks => {
            TCP => {
                hosts => [ 'Micky', 'Mini' ], # this overrides tom and jerry
            },
        },
    );

Now it will not check Tom and Jerry, but rather Micky and Mini.

This attribute derives from Juno::Role::Check.

interval

An integer of seconds between each check (nor per-host).

This attribute derives from Juno::Role::Check.

on_success

A coderef to run when making a successful connection.

This attribute derives from Juno::Role::Check.

on_fail

A coderef to run when failing to make a connection.

This attribute derives from Juno::Role::Check.

on_before

A coderef to run before making a request. A useful example of this is timing the request.

watcher

Holds the watcher for the HTTP check timer.

This attribute derives from Juno::Role::Check.

METHODS

check

Juno will call this method for you. You should not call it yourself.

run

Juno will call this method for you. You should not call it yourself.

AUTHORS

  • Sawyer X <xsawyerx@cpan.org>

  • Adam Balali <adamba@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Sawyer X.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.