Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBadFormat errResponse = []byte(`BAD_FORMAT\r\n`)
ErrBadFormat - The client sent a command line that was not well-formed.
This can happen if the line does not end with \r\n, if non-numeric characters occur where an integer is expected, if the wrong number of arguments are present, or if the command line is mal-formed in any other way.
var ErrInternal errResponse = []byte(`INTERNAL_ERROR\r\n`)
ErrInternal - This indicates a bug in the server. It should never happen.
var ErrJobNotFound = errors.New("job not found")
ErrJobNotFound is thrown when doing an operation against an unknown job
var ErrOutOfMem errResponse = []byte(`OUT_OF_MEMORY\r\n`)
ErrOutOfMem - The server cannot allocate enough memory for the job.
The client should try again later.
var ErrTubeNotFound = errors.New("tube not found")
ErrTubeNotFound is thrown when doing an operation against an unknown tube
var ErrUnknownCmd errResponse = []byte(`UNKNOWN_COMMAND\r\n`)
ErrUnknownCmd - The client sent a command that the server does not know.
Functions ¶
This section is empty.
Types ¶
type BeanstalkdSrv ¶
type BeanstalkdSrv interface {
// contains filtered or unexported methods
}
BeanstalkdSrv implements the beanstalkd server responsibilities
type Connection ¶
Connection implements a yaad + beanstalkd protocol server
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
Job represents a beanstalkd job
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a yaad server
func NewYaadServer ¶
func NewYaadServer() *Server
NewYaadServer returns a pointer to a new yaad server
func (*Server) ListenAndServe ¶
ListenAndServe starts listening for new connections (blocking)
type SrvStub ¶
type SrvStub struct {
// contains filtered or unexported fields
}
SrvStub implements a stub beanstalkd instance
type SrvYaad ¶
type SrvYaad struct {
// contains filtered or unexported fields
}
SrvYaad implements a yaad beanstalkd instance
type Tube ¶
type Tube interface {
// contains filtered or unexported methods
}
Tube is a beanstalkd tube