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.
3814 3815 3816 |
# File 'lib/google/apis/run_v1/classes.rb', line 3814 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
3800 3801 3802 |
# File 'lib/google/apis/run_v1/classes.rb', line 3800 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
3807 3808 3809 |
# File 'lib/google/apis/run_v1/classes.rb', line 3807 def percent @percent end |
#revision_name ⇒ String
Revision to which to assign this portion of instances.
Corresponds to the JSON property revisionName
3812 3813 3814 |
# File 'lib/google/apis/run_v1/classes.rb', line 3812 def revision_name @revision_name end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3819 3820 3821 3822 3823 |
# File 'lib/google/apis/run_v1/classes.rb', line 3819 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 |