MCPcopy Create free account
hub / github.com/dbProjectRED/redimo.go / parsePendingItem

Function parsePendingItem

streams.go:180–189  ·  view source on GitHub ↗
(avm map[string]dynamodb.AttributeValue, c Client)

Source from the content-addressed store, hash-verified

178}
179
180func parsePendingItem(avm map[string]dynamodb.AttributeValue, c Client) (pi PendingItem) {
181 pi.ID = XID(aws.StringValue(avm[c.sk].S))
182 pi.Consumer = aws.StringValue(avm[consumerKey].S)
183 timestamp, _ := strconv.ParseInt(aws.StringValue(avm[lastDeliveryTimestampKey].N), 10, 64)
184 pi.LastDelivered = time.Unix(timestamp, 0)
185 deliveryCount, _ := strconv.ParseInt(aws.StringValue(avm[deliveryCountKey].N), 10, 64)
186 pi.DeliveryCount = deliveryCount
187
188 return
189}
190
191func (i StreamItem) putAction(key string, c Client) dynamodb.TransactWriteItem {
192 return dynamodb.TransactWriteItem{

Callers 2

XPENDINGMethod · 0.85
xGroupReadPendingMethod · 0.85

Calls 1

XIDTypeAlias · 0.85

Tested by

no test coverage detected