Class: SDM::SecretStoresHistory
- Inherits:
-
Object
- Object
- SDM::SecretStoresHistory
- Extended by:
- Gem::Deprecate
- Defined in:
- lib/svc.rb
Overview
SecretStoresHistory records all changes to the state of a SecretStore.
See SecretStoreHistory.
Instance Method Summary collapse
-
#initialize(channel, parent) ⇒ SecretStoresHistory
constructor
A new instance of SecretStoresHistory.
-
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of SecretStoreHistory records matching a given set of criteria.
Constructor Details
#initialize(channel, parent) ⇒ SecretStoresHistory
Returns a new instance of SecretStoresHistory.
6459 6460 6461 6462 6463 6464 6465 6466 |
# File 'lib/svc.rb', line 6459 def initialize(channel, parent) begin @stub = V1::SecretStoresHistory::Stub.new(nil, nil, channel_override: channel) rescue => exception raise Plumbing::convert_error_to_porcelain(exception) end @parent = parent end |
Instance Method Details
#list(filter, *args, deadline: nil) ⇒ Object
List gets a list of SecretStoreHistory records matching a given set of criteria.
6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 |
# File 'lib/svc.rb', line 6469 def list( filter, *args, deadline: nil ) req = V1::SecretStoreHistoryListRequest.new() req. = V1::ListRequestMetadata.new() if @parent.page_limit > 0 req..limit = @parent.page_limit end if not @parent.snapshot_time.nil? req..snapshot_at = @parent.snapshot_time end req.filter = Plumbing::quote_filter_args(filter, *args) resp = Enumerator::Generator.new { |g| tries = 0 loop do begin plumbing_response = @stub.list(req, metadata: @parent.("SecretStoresHistory.List", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception)) tries + +@parent.jitterSleep(tries) next end raise Plumbing::convert_error_to_porcelain(exception) end tries = 0 plumbing_response.history.each do |plumbing_item| g.yield Plumbing::convert_secret_store_history_to_porcelain(plumbing_item) end break if plumbing_response..next_cursor == "" req..cursor = plumbing_response..next_cursor end } resp end |