目录

Momento Golang Sample

A simple repository that supports this Article. It highlights how to set up the Momento client and use it in a Golang Lambda Function.

Up and Running

cdk deploy
# watch
cdk watch # this just is a nice little nugget

Then create the record route record

DDB Record

Lastly, let’s run the Lambda with this event payload

{
    "name": "sample",
    "correlationId": "abc"
}

Once you’ve done all of that, you’ll get some output that looks like this.

First, run, you’ll set the cache as a miss, the DDB is queried and then set.

Hit Miss

Run it a second time, and you’ll see the cache hit

Output

邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802032778号