MCPcopy Create free account
hub / github.com/aws-samples/aws-lambda-extensions / InitDynamodb

Function InitDynamodb

cache-extension-demo/plugins/dynamodb.go:36–48  ·  view source on GitHub ↗

Initialize map and cache data (only if requested)

(dynamodbConfiguration []DynamodbConfiguration, initializeCache bool)

Source from the content-addressed store, hash-verified

34
35// Initialize map and cache data (only if requested)
36func InitDynamodb(dynamodbConfiguration []DynamodbConfiguration, initializeCache bool) {
37 for _, dynamodbConfig := range dynamodbConfiguration {
38 if initializeCache {
39 // Read data from Dynamodb
40 GetData(dynamodbConfig)
41 } else {
42 dynamoDbCache[GetKey(dynamodbConfig)] = Dynamodb{
43 CacheData: CacheData{},
44 DynamodbConfiguration: dynamodbConfig,
45 }
46 }
47 }
48}
49
50// Read data from Dynamodb
51func GetData(dynamodbConfig DynamodbConfiguration) string {

Callers

nothing calls this directly

Calls 2

GetDataFunction · 0.85
GetKeyFunction · 0.85

Tested by

no test coverage detected