Class: Google::Apis::NetworkservicesV1::HttpRouteRequestMirrorPolicy

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

Specifies the policy on how requests are shadowed to a separate mirrored destination service. The proxy does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow. Mirroring is currently not supported for Cloud Run destinations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HttpRouteRequestMirrorPolicy

Returns a new instance of HttpRouteRequestMirrorPolicy.



2386
2387
2388
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2386

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

Instance Attribute Details

#destinationGoogle::Apis::NetworkservicesV1::HttpRouteDestination

Specifications of a destination to which the request should be routed to. Corresponds to the JSON property destination



2378
2379
2380
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2378

def destination
  @destination
end

#mirror_percentFloat

Optional. The percentage of requests to get mirrored to the desired destination. Corresponds to the JSON property mirrorPercent

Returns:

  • (Float)


2384
2385
2386
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2384

def mirror_percent
  @mirror_percent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2391
2392
2393
2394
# File 'lib/google/apis/networkservices_v1/classes.rb', line 2391

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