dchem / beanstalkd.nim

A Nim client library for beanstalkd work queues.

Home Page:http://tormaroe.github.io/beanstalkd.nim/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

beanstalkd.nim logo

This is a Nim client library to connect to and use beanstalkd.

Status: Beta, ready for experimental usage, may not be production ready.

Installation

Join the chat at https://gitter.im/tormaroe/beanstalkd.nim

Install this library using the nimble package manager:

nimble install beanstalkd

Usage

beanstalkd.nim maps pretty closely to the beanstalkd protocol. For complete module documentation, see tormaroe.github.io/beanstalkd.nim.

import beanstalkd

let client = beanstalkd.open("127.0.0.1")
discard client.put("hello world")

let job = client.reserve
echo job
 #==> (success: true, status: reserved, id: 42, job: hello world)

let result = client.delete(job.id)
echo result
 #==> (success: true, status: deleted)

Development

This project uses vagrant to bootstrap the development environment. To get started:

$ git clone https://github.com/tormaroe/beanstalkd.nim
$ cd beanstalkd.nim
$ vagrant up
$ vagrant ssh
$ cd /vagrant

Now to build and run all the examples, do:

$ ./test

Executables are located in /vagrant/build. To only compile the beanstalkd module, do:

$ ./compile

To re-generate module documentation, run:

$ ./gendoc

TODO: How to prepare new release...

About

A Nim client library for beanstalkd work queues.

http://tormaroe.github.io/beanstalkd.nim/

License:MIT License


Languages

Language:Nim 94.3%Language:Shell 5.7%