Class: Google::Apis::RunV1::InstanceSplit

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstanceSplit

Returns a new instance of InstanceSplit.



4049
4050
4051
# File 'lib/google/apis/run_v1/classes.rb', line 4049

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

Instance Attribute Details

#latest_revisionBoolean 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

Returns:

  • (Boolean)


4035
4036
4037
# File 'lib/google/apis/run_v1/classes.rb', line 4035

def latest_revision
  @latest_revision
end

#percentFixnum

Optional. Specifies percent of the instance split to this Revision. This defaults to zero if unspecified. Corresponds to the JSON property percent

Returns:

  • (Fixnum)


4042
4043
4044
# File 'lib/google/apis/run_v1/classes.rb', line 4042

def percent
  @percent
end

#revision_nameString

Revision to which to assign this portion of instances. Corresponds to the JSON property revisionName

Returns:

  • (String)


4047
4048
4049
# File 'lib/google/apis/run_v1/classes.rb', line 4047

def revision_name
  @revision_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4054
4055
4056
4057
4058
# File 'lib/google/apis/run_v1/classes.rb', line 4054

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