groupcache practice
1.0.0
La práctica para groupcache
Crear el proyecto Use GroupCache
Entornos:

versión de groupcache
Paso de ejecución:
cd database && go run main.go # insert one entry:
# key: name, value: zouying
curl -H " Content-Type: application/json " -X POST -d ' {"key": "name", "value": "zouying"} ' http://localhost:9000/set
# check insert
curl -H " Content-Type: application/json " -X POST -d ' {"key": "name"} ' http://localhost:9000/get cd frontend
# run the first node
go run ./main.go -addr= " :8001 " -port " :18001 "
# run the second node
go run ./main.go -addr= " :8002 " -port " :18002 " # try the first node api
curl -H " Content-Type: application/json " -X POST -d ' {"key": "name"} ' http://localhost:18001/get
# try the second node api
curl -H " Content-Type: application/json " -X POST -d ' {"key": "name"} ' http://localhost:18002/get