我正在尝试从我的 dynamodb 表中返回项目计数。我已经有一个 getLiveItemCount() 函数,它看起来像这样:
func GetLiveItemCount(tableName string) *int64 {
dynamodbClient := createDynamoDBClient()
items, _ := dynamodbClient.Scan(&dynamodb.ScanInput{
TableName: aws.String(tableName),
})
return items.Count
}
但是,我希望有另一个函数可以从项目摘要使用的最近更新的项目指标中返回项目计数(项目摘要包括item count、table size和Average item size每 6 小时更新一次)。有什么办法可以在 Golang 中获取这个值吗?
GCT1015
相关分类