Class: Google::Apis::NetworkservicesV1::HttpRouteFaultInjectionPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/networkservices_v1/classes.rb,
lib/google/apis/networkservices_v1/representations.rb,
lib/google/apis/networkservices_v1/representations.rb

Overview

The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced by client proxy on a percentage of requests before sending those requests to the destination service. Similarly requests can be aborted by client proxy for a percentage of requests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HttpRouteFaultInjectionPolicy

Returns a new instance of HttpRouteFaultInjectionPolicy.



1470
1471
1472
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1470

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#abortGoogle::Apis::NetworkservicesV1::HttpRouteFaultInjectionPolicyAbort

Specification of how client requests are aborted as part of fault injection before being sent to a destination. Corresponds to the JSON property abort



1462
1463
1464
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1462

def abort
  @abort
end

#delayGoogle::Apis::NetworkservicesV1::HttpRouteFaultInjectionPolicyDelay

Specification of how client requests are delayed as part of fault injection before being sent to a destination. Corresponds to the JSON property delay



1468
1469
1470
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1468

def delay
  @delay
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1475
1476
1477
1478
# File 'lib/google/apis/networkservices_v1/classes.rb', line 1475

def update!(**args)
  @abort = args[:abort] if args.key?(:abort)
  @delay = args[:delay] if args.key?(:delay)
end