modulepackage
0.2.0
Repository: https://github.com/beanstalkd/go-beanstalk.git
Documentation: pkg.go.dev
# README
Beanstalk
Go client for beanstalkd.
Install
$ go get github.com/beanstalkd/go-beanstalk
Use
Produce jobs:
c, err := beanstalk.Dial("tcp", "127.0.0.1:11300")
id, err := c.Put([]byte("hello"), 1, 0, 120*time.Second)
Consume jobs:
c, err := beanstalk.Dial("tcp", "127.0.0.1:11300")
id, body, err := c.Reserve(5 * time.Second)
# Functions
Dial connects addr on the given network using net.DialTimeout with a default timeout of 10s and then returns a new Conn for the connection.
DialTimeout connects addr on the given network using net.DialTimeout with a supplied timeout and then returns a new Conn for the connection.
NewConn returns a new Conn using conn for I/O.
NewTube returns a new Tube representing the given name.
NewTubeSet returns a new TubeSet representing the given names.
# Constants
DefaultDialTimeout is the time to wait for a connection to the beanstalk server.
DefaultKeepAlivePeriod is the default period between TCP keepalive messages.
NameChars are the allowed name characters in the beanstalkd protocol.
# Variables
contains a character not in NameChars.
Error messages returned by the server.
Error messages returned by the server.
Error messages returned by the server.
Error messages returned by the server.
Name format errors.
Error messages returned by the server.
Error messages returned by the server.
Error messages returned by the server.
Error messages returned by the server.
Error messages returned by the server.
Error messages returned by the server.
Error messages returned by the server.
Name format errors.
Error messages returned by the server.
# Structs
A Conn represents a connection to a beanstalkd server.
ConnError records an error message from the server and the operation and connection that caused it.
NameError indicates that a name was malformed and the specific error describing how.
Tube represents tube Name on the server connected to by Conn.
TubeSet represents a set of tubes on the server connected to by Conn.