Class: LaunchDarkly::Impl::Integrations::DynamoDB::DynamoDBStoreImplBase
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Integrations::DynamoDB::DynamoDBStoreImplBase
- Defined in:
- lib/ldclient-rb/impl/integrations/dynamodb_impl.rb
Overview
Direct Known Subclasses
Constant Summary collapse
- PARTITION_KEY =
"namespace"
- SORT_KEY =
"key"
Instance Method Summary collapse
-
#initialize(table_name, opts) ⇒ DynamoDBStoreImplBase
constructor
A new instance of DynamoDBStoreImplBase.
- #stop ⇒ Object
Constructor Details
#initialize(table_name, opts) ⇒ DynamoDBStoreImplBase
Returns a new instance of DynamoDBStoreImplBase.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/ldclient-rb/impl/integrations/dynamodb_impl.rb', line 23 def initialize(table_name, opts) unless AWS_SDK_ENABLED raise RuntimeError.new("can't use #{description} without the aws-sdk or aws-sdk-dynamodb gem") end @table_name = table_name @prefix = opts[:prefix] ? (opts[:prefix] + ":") : "" @logger = opts[:logger] || Config.default_logger if !opts[:existing_client].nil? @client = opts[:existing_client] else @client = Aws::DynamoDB::Client.new(opts[:dynamodb_opts] || {}) end @logger.info("#{description}: using DynamoDB table \"#{table_name}\"") end |
Instance Method Details
#stop ⇒ Object
41 42 43 |
# File 'lib/ldclient-rb/impl/integrations/dynamodb_impl.rb', line 41 def stop # AWS client doesn't seem to have a close method end |