Module: LaunchDarkly::Integrations::DynamoDB
- Defined in:
- lib/ldclient-rb/integrations/dynamodb.rb
Overview
Integration with [DynamoDB](aws.amazon.com/dynamodb/).
Note that in order to use this integration, you must first install one of the AWS SDK gems: either ‘aws-sdk-dynamodb`, or the full `aws-sdk`.
Class Method Summary collapse
-
.new_big_segment_store(table_name, opts) ⇒ LaunchDarkly::Interfaces::BigSegmentStore
Creates a DynamoDB-backed Big Segment store.
-
.new_feature_store(table_name, opts = {}) ⇒ LaunchDarkly::Interfaces::FeatureStore
Creates a DynamoDB-backed persistent feature store.
Class Method Details
.new_big_segment_store(table_name, opts) ⇒ LaunchDarkly::Interfaces::BigSegmentStore
Creates a DynamoDB-backed Big Segment store.
Big Segments are a specific type of segments. For more information, read the LaunchDarkly documentation: docs.launchdarkly.com/home/users/big-segments
To use this method, you must first install one of the AWS SDK gems: either ‘aws-sdk-dynamodb`, or the full `aws-sdk`. Then, put the object returned by this method into the `store` property of your Big Segments configuration (see `Config`).
Note that the specified table must already exist in DynamoDB. It must have a partition key called “namespace”, and a sort key called “key” (both strings). The SDK does not create the table automatically because it has no way of knowing what additional properties (such as permissions and throughput) you would want it to have.
By default, the DynamoDB client will try to get your AWS credentials and region name from environment variables and/or local configuration files, as described in the AWS SDK documentation. You can also specify any supported AWS SDK options in ‘dynamodb_opts`– or, provide an already-configured DynamoDB client in `existing_client`.
87 88 89 |
# File 'lib/ldclient-rb/integrations/dynamodb.rb', line 87 def self.new_big_segment_store(table_name, opts) LaunchDarkly::Impl::Integrations::DynamoDB::DynamoDBBigSegmentStore.new(table_name, opts) end |
.new_feature_store(table_name, opts = {}) ⇒ LaunchDarkly::Interfaces::FeatureStore
Creates a DynamoDB-backed persistent feature store. For more details about how and why you can use a persistent feature store, see the [SDK reference guide](docs.launchdarkly.com/sdk/features/storing-data#ruby).
To use this method, you must first install one of the AWS SDK gems: either ‘aws-sdk-dynamodb`, or the full `aws-sdk`. Then, put the object returned by this method into the `feature_store` property of your client configuration (Config).
Note that the specified table must already exist in DynamoDB. It must have a partition key called “namespace”, and a sort key called “key” (both strings). The SDK does not create the table automatically because it has no way of knowing what additional properties (such as permissions and throughput) you would want it to have.
By default, the DynamoDB client will try to get your AWS credentials and region name from environment variables and/or local configuration files, as described in the AWS SDK documentation. You can also specify any supported AWS SDK options in ‘dynamodb_opts`– or, provide an already-configured DynamoDB client in `existing_client`.
49 50 51 52 |
# File 'lib/ldclient-rb/integrations/dynamodb.rb', line 49 def self.new_feature_store(table_name, opts = {}) core = LaunchDarkly::Impl::Integrations::DynamoDB::DynamoDBFeatureStoreCore.new(table_name, opts) LaunchDarkly::Integrations::Util::CachingStoreWrapper.new(core, opts) end |