Skip to content
Fetching latest commit…
Cannot retrieve the latest commit at this time.
..
Failed to load latest commit information.
Makefile
README.md
simpletokyo.c
test.expected
test.sh

README.md

simpletokyo

SimpleTokyo provides a light http interface to Tokyo Tyrant. It supports the following commands.

Command Line Options:

--address= address to listen on default: 0.0.0.0 --daemon daemonize process --enable-logging request logging --group= run as this group --help list usage --port= port to listen on default: 8080 --root= chdir and run from this directory --ttserver-host= default: 127.0.0.1 --ttserver-port= default: 1978 --user= run as this user --version

API endpoints:

  • /get
    parameter: key

  • /put
    parameter: key
    parameter: value

  • /del
    parameter: key

  • /fwmatch
    parameter:key
    parameter:max (optional)
    parameter:length (optional)
    parameter:offset (optional)
    parameter:format=json|txt [default json]

  • /fwmatch_int (returns values added with /incr) parameter:key parameter:max (optional) parameter:length (optional)
    parameter:offset (optional)
    parameter:format=json|txt [default json]

  • /fwmatch_int_merged (returns values added with /incr via prefix merge to single lines) parameter:key parameter:max (optional) parameter:length (optional)
    parameter:offset (optional)
    parameter:format=json|txt [default json]

  • /incr
    parameter:key
    parameter:value

  • /get_int (to return values added with /incr)
    parameter:key (accepts multiple &key= parameters)

  • /mget_int (to return values added with /incr)
    parameter:key (accepts multiple &key= parameters)

  • /mget parameter:key (accepts multiple &key= parameters) parameter:format=json|txt

  • /vanish (empty the database)

  • /stats (example output)
    parameter: format=json (optional)
    Total requests: 439
    /get requests: 0
    /get_int requests: 0
    /put requests: 303
    /del requests: 136
    /fwmatch requests: 0
    /fwmatch_int_ requests: 0
    /incr requests: 0
    /vanish requests: 0
    db opens: 1

  • /exit

Dependencies

Something went wrong with that request. Please try again.