浏览代码

moved to github

tags/0.1.3^0
mikespook 11 年前
父节点
当前提交
d6c6bfe9f0
共有 13 个文件被更改,包括 38 次插入38 次删除
  1. +16
    -16
      README.md
  2. +2
    -2
      client/client.go
  3. +1
    -1
      client/job.go
  4. +1
    -1
      example/client.go
  5. +2
    -2
      example/exec-worker/exec.go
  6. +2
    -2
      example/exec-worker/func.go
  7. +1
    -1
      example/exec-worker/log.go
  8. +5
    -5
      example/exec-worker/worker.go
  9. +2
    -2
      example/worker.go
  10. +3
    -3
      gearman.go
  11. +1
    -1
      worker/agent.go
  12. +1
    -1
      worker/job.go
  13. +1
    -1
      worker/worker.go

+ 16
- 16
README.md 查看文件

@@ -8,22 +8,24 @@ All rights reserved.
Use of this source code is governed by a MIT license that can be found
in the LICENSE file.

# INSTALL
Install
=======

Install the client package:

> $ go get bitbucket.org/mikespook/gearman-go/client
> $ go get github.com/mikespook/gearman-go/client
Install the worker package:

> $ go get bitbucket.org/mikespook/gearman-go/worker
> $ go get github.com/mikespook/gearman-go/worker

Install both:

> $ go get bitbucket.org/mikespook/gearman-go
> $ go get github.com/mikespook/gearman-go

# SAMPLE OF USAGE
Usage
=====

## Worker

@@ -53,19 +55,17 @@ Install both:
handle, err := c.Do("ToUpper", echo, client.JOB_NORMAL)
// ...

# Contacts
Authors
=======

Xing Xing <mikespook@gmail.com>
Xing Xing <mikespook@gmail.com> [Blog](http://mikespook.com) [@Twitter](http://twitter.com/mikespook)

[Blog](http://mikespook.com)
Open Source - MIT Software License
==================================
Copyright (c) 2012 Xing Xing

[@Twitter](http://twitter.com/mikespook)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

# History
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

* 0.1.2 Fixed issues: timeout executing, resources leaking.
* 0.1.1 Fixed the issue of grabbing jobs.
* 0.1 Code refactoring; Redesign the API.
* 0.0.1 Initial implementation, ugly code-style, slow profermance and unstable API.

# TODO
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 2
- 2
client/client.go 查看文件

@@ -11,8 +11,8 @@ import (
"time"
"bytes"
"strconv"
"bitbucket.org/mikespook/golib/autoinc"
"bitbucket.org/mikespook/gearman-go/common"
"github.com/mikespook/golib/autoinc"
"github.com/mikespook/gearman-go/common"
)

// Job handler


+ 1
- 1
client/job.go 查看文件

@@ -7,7 +7,7 @@ package client

import (
"bytes"
"bitbucket.org/mikespook/gearman-go/common"
"github.com/mikespook/gearman-go/common"
)

const (


+ 1
- 1
example/client.go 查看文件

@@ -3,7 +3,7 @@ package main
import (
"log"
"sync"
"bitbucket.org/mikespook/gearman-go/client"
"github.com/mikespook/gearman-go/client"
)

func main() {


+ 2
- 2
example/exec-worker/exec.go 查看文件

@@ -10,8 +10,8 @@ import (
"bytes"
"os/exec"
"encoding/json"
"bitbucket.org/mikespook/golib/log"
"bitbucket.org/mikespook/gearman-go/worker"
"github.com/mikespook/golib/log"
"github.com/mikespook/gearman-go/worker"
)

type outData struct {


+ 2
- 2
example/exec-worker/func.go 查看文件

@@ -6,8 +6,8 @@
package main

import (
"bitbucket.org/mikespook/golib/log"
"bitbucket.org/mikespook/gearman-go/worker"
"github.com/mikespook/golib/log"
"github.com/mikespook/gearman-go/worker"
)

func execShell(job *worker.Job) (result []byte, err error) {


+ 1
- 1
example/exec-worker/log.go 查看文件

@@ -6,7 +6,7 @@
package main

import (
"bitbucket.org/mikespook/golib/log"
"github.com/mikespook/golib/log"
"flag"
"strings"
)


+ 5
- 5
example/exec-worker/worker.go 查看文件

@@ -9,11 +9,11 @@ import (
"os"
"flag"
"time"
"bitbucket.org/mikespook/golib/log"
"bitbucket.org/mikespook/golib/pid"
"bitbucket.org/mikespook/golib/prof"
"bitbucket.org/mikespook/golib/signal"
"bitbucket.org/mikespook/gearman-go/worker"
"github.com/mikespook/golib/log"
"github.com/mikespook/golib/pid"
"github.com/mikespook/golib/prof"
"github.com/mikespook/golib/signal"
"github.com/mikespook/gearman-go/worker"
)

var (


+ 2
- 2
example/worker.go 查看文件

@@ -5,8 +5,8 @@ import (
"log"
"time"
"strings"
"bitbucket.org/mikespook/golib/signal"
"bitbucket.org/mikespook/gearman-go/worker"
"github.com/mikespook/golib/signal"
"github.com/mikespook/gearman-go/worker"
)

func ToUpper(job *worker.Job) ([]byte, error) {


+ 3
- 3
gearman.go 查看文件

@@ -10,7 +10,7 @@ The protocol was implemented by native way.
package gearman

import (
_ "bitbucket.org/mikespook/gearman-go/common"
_ "bitbucket.org/mikespook/gearman-go/client"
_ "bitbucket.org/mikespook/gearman-go/worker"
_ "github.com/mikespook/gearman-go/common"
_ "github.com/mikespook/gearman-go/client"
_ "github.com/mikespook/gearman-go/worker"
)

+ 1
- 1
worker/agent.go 查看文件

@@ -7,7 +7,7 @@ package worker
import (
"io"
"net"
"bitbucket.org/mikespook/gearman-go/common"
"github.com/mikespook/gearman-go/common"
)

// The agent of job server.


+ 1
- 1
worker/job.go 查看文件

@@ -7,7 +7,7 @@ package worker

import (
"strconv"
"bitbucket.org/mikespook/gearman-go/common"
"github.com/mikespook/gearman-go/common"
)

// Worker side job


+ 1
- 1
worker/worker.go 查看文件

@@ -7,7 +7,7 @@ package worker
import (
"time"
"bytes"
"bitbucket.org/mikespook/gearman-go/common"
"github.com/mikespook/gearman-go/common"
)

const (


正在加载...
取消
保存