It is KVS which uses RDBMS as backend. By using RDBMS, data can be easily perpetuated. Also, I have a cache layer to improve performance.
It is structured to transparently retrieve data from backend's rdbms. It is suitable for cases where management is troublesome when it is desired to perpetuate data with KVS or the like. Access by HTTP and get data with GET. With the type
parameter, it returns data in the form plain, json, messagepack. There is an Onmemory arc
and a Storage leveldb
for caching structures.
docker run -it hiroyukim/go-chatora
go get -u github.com/hiroyukim/go-chatora
cd $GOPATH/src/github.com/hiroyukim/go-chatora
go build
- config.yaml
- cache_type
- leveldb
- arc
- driver_name
- sqlite3
- mysql
- data_source_name
- sqlite3: `/path/to/your.db'
- mysql:
[username[:password]@][protocol[(address)]]/dbname[?param1=value1&...¶mN=valueN]
- table_name
- string
- lru_max_size
- int
- port
- int
- debug_mode
- bool
- cache_type
---
driver_name: sqlite3
data_source_name: ./go-chatora.db
debug_mode: false
sqlite ./go-chatora.db
CREATE TABLE key_values
(
"key" TEXT NOT NULL UNIQUE,
value TEXT NOT NULL
);
INSERT INTO key_values (key,value) VALUES('9s','s')
./go-chatora -c config.yaml
curl http://0.0.0.0:8080/?key=yourkey&type=json
- plain(default)
- json
- msgp
hiroyukim