Class: Google::Apis::RunV1::InstanceSplit
- Inherits:
-
Object
- Object
- Google::Apis::RunV1::InstanceSplit
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/run_v1/classes.rb,
lib/google/apis/run_v1/representations.rb,
lib/google/apis/run_v1/representations.rb
Overview
Holds a single instance split entry for the Worker. Allocations can be done to a specific Revision name, or pointing to the latest Ready Revision.
Instance Attribute Summary collapse
-
#latest_revision ⇒ Boolean
(also: #latest_revision?)
Uses the "status.latestReadyRevisionName" to determine the instance split target.
-
#percent ⇒ Fixnum
Optional.
-
#revision_name ⇒ String
Revision to which to assign this portion of instances.
Instance Method Summary collapse
-
#initialize(**args) ⇒ InstanceSplit
constructor
A new instance of InstanceSplit.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ InstanceSplit
Returns a new instance of InstanceSplit.
3715 3716 3717 |
# File 'lib/google/apis/run_v1/classes.rb', line 3715 def initialize(**args) update!(**args) end |
Instance Attribute Details
#latest_revision ⇒ Boolean Also known as: latest_revision?
Uses the "status.latestReadyRevisionName" to determine the instance split
target. When it changes, workloads will automatically migrate from the prior "
latest ready" revision to the new one.
Corresponds to the JSON property latestRevision
3701 3702 3703 |
# File 'lib/google/apis/run_v1/classes.rb', line 3701 def latest_revision @latest_revision end |
#percent ⇒ Fixnum
Optional. Specifies percent of the instance split to this Revision. This
defaults to zero if unspecified.
Corresponds to the JSON property percent
3708 3709 3710 |
# File 'lib/google/apis/run_v1/classes.rb', line 3708 def percent @percent end |
#revision_name ⇒ String
Revision to which to assign this portion of instances.
Corresponds to the JSON property revisionName
3713 3714 3715 |
# File 'lib/google/apis/run_v1/classes.rb', line 3713 def revision_name @revision_name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3720 3721 3722 3723 3724 |
# File 'lib/google/apis/run_v1/classes.rb', line 3720 def update!(**args) @latest_revision = args[:latest_revision] if args.key?(:latest_revision) @percent = args[:percent] if args.key?(:percent) @revision_name = args[:revision_name] if args.key?(:revision_name) end |