MCPcopy Create free account
hub / github.com/cortexproject/cortex / generateItemKey

Function generateItemKey

pkg/ring/kv/dynamodb/dynamodb.go:336–344  ·  view source on GitHub ↗
(key dynamodbKey)

Source from the content-addressed store, hash-verified

334}
335
336func generateItemKey(key dynamodbKey) map[string]types.AttributeValue {
337 resp := map[string]types.AttributeValue{
338 primaryKey: &types.AttributeValueMemberS{Value: key.primaryKey},
339 }
340 if len(key.sortKey) > 0 {
341 resp[sortKey] = &types.AttributeValueMemberS{Value: key.sortKey}
342 }
343 return resp
344}
345
346func getCapacityUnits(cap *types.ConsumedCapacity) float64 {
347 if cap != nil && cap.CapacityUnits != nil {

Callers 3

DeleteMethod · 0.85
BatchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected