Skip to content

deep-stack/group-cache-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Group Cache Proof of Concept

Usage

  • Ensure Go 1.16 is installed
  • Ensure Postgres 12 is installed
  • Run
sudo -u postgres createdb group_cache_poc
  • Update password of postgres user in ./env/config.json
  • Run
go build main.go
  • Run
./main -addr=:8080 -pool=http://localhost:8080,http://localhost:8081 &
  • Run
./main -addr=:8081 -pool=http://localhost:8081,http://localhost:8080 &
  • Database Tables will be created automatically
  • 2 HTTP servers will start on ports 8080 and 8081

RESTful API

  • get : GET kv/get?key=k
  • set (upsert) : POST kv/set?key=k&value=v

Testing

curl -X POST "localhost:8080/kv/set?key=foo&value=bar"
curl "localhost:8081/kv/get?key=foo"

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages