File Coverage

blib/lib/Net/Fastly/Backend.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Net::Fastly::Backend;
2              
3 4     4   13 use strict;
  4         6  
  4         94  
4 4     4   12 use base qw(Net::Fastly::BelongsToServiceAndVersion);
  4         4  
  4         1301  
5              
6             Net::Fastly::Backend->mk_accessors(qw(service_id name address ipv4 ipv6 hostname use_ssl client_cert port
7             connect_timeout first_byte_timeout between_bytes_timeout error_threshold max_conn weight comment healthcheck auto_loadbalance request_condition));
8              
9             =head1 NAME
10              
11             Net::Fastly::Backend - Representation of an individual host you want to serve assets off
12              
13             =head1 ACCESSORS
14              
15             =head2 service_id
16              
17             The id of the service this belongs to.
18              
19             =head2 version
20              
21             The number of the version this belongs to.
22              
23             =head2 name
24              
25             The name of this backend.
26              
27             =head2 address
28              
29             A magic field - will automagically be set to whichever of ipv4, ipv6 or hostname is currently set.
30              
31             Conversely if you set the address field then the correct field from ipv4, ipv6 or hostname will be set.
32              
33             =head2 ipv4
34              
35             the ipv4 address of the host to serve assets (this, hostname or ipv6 must be set)
36              
37             =head2 ipv6
38              
39             the ipv6 address of the host to serve assets (this, hostname or ipv4 must be set)
40              
41             =head2 hostname
42              
43             the hostname to serve assets from (this, ipv4 or ipv6 must be set)
44              
45             =head2 port
46              
47             the port to connect to (default 80)
48              
49             =head2 use_ssl
50              
51             whether to use ssl to get to the backend (default 0 i.e false)
52              
53             =head2 connect_timeout
54              
55             how long in milliseconds to wait for a connect before declaring the backend out of rotation (default 1,000)
56              
57             =head2 first_byte_timeout
58              
59             how long in milliseconds to wait for the first bytes before declaring the host out of rotation (default 15,000)
60              
61             =head2 between_bytes_timeout
62              
63             how long in milliseconds to wait between bytes before declaring the backend out of rotation (default 10,000)
64              
65             =head2 error_threshold
66              
67             how many errors before declaring the backend out of rotation (default 0, 0 meaning turned off)
68              
69             =head2 max_conn
70              
71             the maximum number of connections to this backend (default 20)
72              
73             =head2 weight
74              
75             the weight assigned to this backend (default 100)
76              
77             =head2 healthcheck
78              
79             the name of a healthcheck to associate with this backend. See the Healthcheck object
80              
81             =head2 auto_loadbalance
82              
83             set to 1 if you want to auto_loadbalance, set to 0 if you don't want to auto_loadbalance
84              
85             =head2 request_condition
86              
87             name of a request_condition to filter the backend on
88              
89             =cut
90              
91             1;