key-value-server-go

command module
v0.0.0-...-917efce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

README

key-value-server-go

Key-Value server in Go, JSON file disk persistence, non-blocking concurrent operations

Pre-requisites

You'll need to install:

Launch

Using go:

go run . -release

Send a key-value pair {"1":"1"}:

curl -s -X POST http://localhost:8080/key/1 -d "1"

Retrieve the value for key /key/1:

curl -s http://localhost:8080/key/1

Delete the value for key /key/1:

curl -X DELETE -s http://localhost:8080/key/1

How to build

Using go:

go build

How to test

Using go:

go test 

How to loadtest

Using K6

k6 run --vus 200 ./testdata/k6_get_loadtest.js --duration 60s
k6 run --vus 200 ./testdata/k6_post_loadtest.js --duration 60s
k6 run --vus 200 ./testdata/k6_delete_loadtest.js --duration 60s

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL