2012-03-26 13:32:59 +08:00
|
|
|
# Gearman API for golang
|
|
|
|
|
2012-03-26 14:10:15 +08:00
|
|
|
This module is Gearman API for golang. It was implemented a native
|
|
|
|
protocol for both worker and client API.
|
2012-03-26 13:32:59 +08:00
|
|
|
|
2012-03-26 14:10:15 +08:00
|
|
|
Copyright 2012 Xing Xing <mikespook@gmail.com> All rights reserved.
|
|
|
|
Use of this source code is governed by a MIT license that can be found
|
|
|
|
in the LICENSE file.
|
2012-03-26 13:32:59 +08:00
|
|
|
|
|
|
|
# INSTALL
|
|
|
|
|
|
|
|
This will install the client:
|
|
|
|
|
2012-05-24 16:56:36 +08:00
|
|
|
> $ go get bitbucket.org/mikespook/gearman-go/client
|
2012-03-26 13:32:59 +08:00
|
|
|
|
|
|
|
This will install the worker:
|
|
|
|
|
2012-05-24 16:56:36 +08:00
|
|
|
> $ go get bitbucket.org/mikespook/gearman-go/worker
|
2012-03-26 13:32:59 +08:00
|
|
|
|
|
|
|
This will install the client and the worker automatically:
|
|
|
|
|
|
|
|
> $ go get bitbucket.org/mikespook/gearman-go
|
|
|
|
|
|
|
|
|
|
|
|
# SAMPLE OF USAGE
|
|
|
|
|
|
|
|
## Worker
|
|
|
|
|
|
|
|
> $ cd example
|
2012-03-26 14:10:15 +08:00
|
|
|
>
|
2012-03-26 13:32:59 +08:00
|
|
|
> $ go build worker
|
2012-03-26 14:10:15 +08:00
|
|
|
>
|
2012-03-26 13:32:59 +08:00
|
|
|
> $ ./worker
|
|
|
|
|
|
|
|
## Client
|
|
|
|
|
|
|
|
> $ cd example
|
2012-03-26 14:10:15 +08:00
|
|
|
>
|
2012-03-26 13:32:59 +08:00
|
|
|
> $ go build client
|
2012-03-26 14:10:15 +08:00
|
|
|
>
|
2012-03-26 13:32:59 +08:00
|
|
|
> $ ./client
|
|
|
|
|
|
|
|
# Code format
|
|
|
|
|
|
|
|
> $ gofmt -spaces=true -tabwidth=4 -w=true -tabindent=false $(DIR)
|
|
|
|
|
|
|
|
# Contacts
|
|
|
|
|
2012-05-24 16:56:36 +08:00
|
|
|
Xing Xing <mikespook@gmail.com>
|
2012-03-26 14:10:15 +08:00
|
|
|
|
2012-03-26 13:32:59 +08:00
|
|
|
http://mikespook.com
|
2012-03-26 14:10:15 +08:00
|
|
|
|
2012-03-26 13:32:59 +08:00
|
|
|
http://twitter.com/mikespook
|
2012-05-24 16:56:36 +08:00
|
|
|
|
|
|
|
# History
|
|
|
|
|
|
|
|
* 0.1 Refactoring code, redesign the API.
|
|
|
|
* 0.0.1 Initial implementation, ugly code-style, slow profermance and unstable API.
|