| 1 | package IO::K8s::Role::MiddlewareTCPBuilder; | ||||||||||
| 2 | # ABSTRACT: Role for building Traefik TCP middleware configuration | ||||||||||
| 3 | 7 | our $VERSION = '1.112'; | |||||||||
| 4 | 7 | ▶ | use Moo::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | # The fluent setters below build the spec through IO::K8s::Role::SpecBuilder | ||||||||||
| 7 | # rather than by hand, so that role is a hard dependency of this one (k103). | ||||||||||
| 8 | # IO::K8s::Role::APIObject composes SpecBuilder for every top-level Kind, so | ||||||||||
| 9 | # these are satisfied for anything built with IO::K8s::APIObject; a class | ||||||||||
| 10 | # that composes this role without them now fails at composition time, | ||||||||||
| 11 | # naming the missing method, instead of at the first setter call. | ||||||||||
| 12 | 7 | requires qw( spec_set ); | |||||||||
| 13 | |||||||||||
| 14 | |||||||||||
| 15 | 2 | ▶ | sub in_flight_conn { | ||||||||
|
Subroutine
in_flight_conn: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||
| 16 | 2 | my ($self, $amount) = @_; | |||||||||
| 17 | 2 | ▶ | $self->spec_set('inFlightConn', { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | defined $amount ? (amount => $amount) : (), | ||||||||||
| 19 | }); | ||||||||||
| 20 | 2 | return $self; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | |||||||||||
| 24 | 3 | ▶ | sub ip_allow_list { | ||||||||
|
Subroutine
ip_allow_list: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 25 | 3 | my ($self, @ranges) = @_; | |||||||||
| 26 | 3 | $self->spec_set('ipAllowList', { sourceRange => \@ranges }); | |||||||||
| 27 | 3 | return $self; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | |||||||||||
| 31 | 2 | ▶ | sub ip_white_list { | ||||||||
|
Subroutine
ip_white_list: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 32 | 2 | my ($self, @ranges) = @_; | |||||||||
| 33 | 2 | $self->spec_set('ipWhiteList', { sourceRange => \@ranges }); | |||||||||
| 34 | 2 | return $self; | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 7 | 1; | |||||||||
| 38 | |||||||||||
| 39 | __END__ | ||||||||||