There are two separated applications:
- siderd - long run daemon with rest api.
- sider - command line client to rest api.
Install govendor:
$ go get -u github.com/kardianos/govendor
Build applications separately
$ cd $GOPATH/src/github.com/aandryashin/siderd
Sync dependencies:
$ govendor sync
Build source:
$ go build
Run daemon:
$ ./siderd --help
$ cd $GOPATH/src/github.com/aandryashin/sider
Sync dependencies:
$ govendor sync
Build source:
$ go build
Run command line client:
$ ./sider --help
Keys are strings, values are objects in json notation.
Simple session:
$ sider keys
[]
$ sider set 1 '["one"]'
$ sider set 2 '["two"]'
$ sider set 3 '["three"]'
$ sider keys
[
"3",
"1",
"2"
]
$ sider get 1
[
"one"
]
$ sider del 1
By default keys are not expired, to set keys with expiration timeout provide ttl option in golang time.Duration notation:
$ sider set key '{}' --ttl 10s