Class: Google::Apis::ComputeAlpha::HttpFaultInjection

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HttpFaultInjection

Returns a new instance of HttpFaultInjection.



15245
15246
15247
# File 'lib/google/apis/compute_alpha/classes.rb', line 15245

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

Instance Attribute Details

#abortGoogle::Apis::ComputeAlpha::HttpFaultAbort

Specification for how requests are aborted as part of fault injection. Corresponds to the JSON property abort



15237
15238
15239
# File 'lib/google/apis/compute_alpha/classes.rb', line 15237

def abort
  @abort
end

#delayGoogle::Apis::ComputeAlpha::HttpFaultDelay

Specifies the delay introduced by the load balancer before forwarding the request to the backend service as part of fault injection. Corresponds to the JSON property delay



15243
15244
15245
# File 'lib/google/apis/compute_alpha/classes.rb', line 15243

def delay
  @delay
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



15250
15251
15252
15253
# File 'lib/google/apis/compute_alpha/classes.rb', line 15250

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