Documentation ¶
Overview ¶
Package gearman provides a thread-safe Gearman client
Example ¶
Here's an example program that submits a job to Gearman and listens for events from that job:
package main import( "gopkg.in/Clever/gearman.v2" "ioutil" ) func main() { client, err := gearman.NewClient("tcp4", "localhost:4730") if err != nil { panic(err) } j, err := client.Submit("reverse", []byte("hello world!"), nil, nil) if err != nil { panic(err) } state := j.Run() println(state) // job.Completed data, err := ioutil.ReadAll(j.Data()) if err != nil { panic(err) } println(data) // !dlrow olleh }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Gearman client
Click to show internal directories.
Click to hide internal directories.