Class: Google::Apis::RunV1alpha1::Lifecycle

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/run_v1alpha1/classes.rb,
generated/google/apis/run_v1alpha1/representations.rb,
generated/google/apis/run_v1alpha1/representations.rb

Overview

Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Lifecycle

Returns a new instance of Lifecycle



1503
1504
1505
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1503

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

Instance Attribute Details

#post_startGoogle::Apis::RunV1alpha1::Handler

Handler defines a specific action that should be taken Corresponds to the JSON property postStart



1496
1497
1498
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1496

def post_start
  @post_start
end

#pre_stopGoogle::Apis::RunV1alpha1::Handler

Handler defines a specific action that should be taken Corresponds to the JSON property preStop



1501
1502
1503
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1501

def pre_stop
  @pre_stop
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1508
1509
1510
1511
# File 'generated/google/apis/run_v1alpha1/classes.rb', line 1508

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