Documentation ¶
Overview ¶
Package gearadmin provides simple bindings to the gearman admin protocol: http://gearman.org/protocol/.
Usage ¶
Here's an example program that outputs the status of all worker queues in gearman:
package main import ( "fmt" "github.com/Clever/gearadmin" "net" ) func main() { c, err := net.Dial("tcp", "localhost:4730") if err != nil { panic(err) } defer c.Close() admin := gearadmin.NewGearmanAdmin(c) status, _ := admin.Status() fmt.Printf("%#v\n", status) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GearmanAdmin ¶
type GearmanAdmin struct {
// contains filtered or unexported fields
}
GearmanAdmin communicates with a gearman server.
func NewGearmanAdmin ¶
func NewGearmanAdmin(connection io.ReadWriter) GearmanAdmin
NewGearmanAdmin takes in a connection and returns an object that interacts with gearman's admin protocol.
func (GearmanAdmin) Status ¶
func (ga GearmanAdmin) Status() ([]Status, error)
Status returns the status of all function queues.
func (GearmanAdmin) Workers ¶
func (ga GearmanAdmin) Workers() ([]Worker, error)
Workers returns a summary of workers connected to gearman.
Click to show internal directories.
Click to hide internal directories.