prep / beanstalk Goto Github PK
View Code? Open in Web Editor NEWA beanstalk client for Go
License: BSD 3-Clause "New" or "Revised" License
A beanstalk client for Go
License: BSD 3-Clause "New" or "Revised" License
Hi!
Beanstalkd 1.12 supports Unix Domain Sockets (commit).
Unfortunately, the current client implementation only supports TCP sockets. Even though adding UDS support is trivial and beneficial for people who do not want to have TCP overhead.
Do you want to support UDS?
If not, please close the issue.
If yes, would you prefer just another URL prefix, like unix://
,
beanstalk.Dial("unix:///var/run/beanstalkd/beanstalkd.sock", cfg)
Or is your preference to give a way to construct beanstalk.Conn
by passing net.Conn
as a parameter?
conn, err := net.Dial("unix", "/var/run/beanstalkd/beanstalkd.sock")
if err != nil {
log.Fatalf("Failed to connect: %s", err)
}
bc := beanstalk.NewConn(conn, cfg)
I can prepare a PR if this looks interesting.
Cheers.
func (conn *Conn) delete(ctx context.Context, job *Job) error {
ctx, span := trace.StartSpan(ctx, "github.com/prep/beanstalk/Conn.delete")
defer span.End()
_, _, err := conn.lcommand(ctx, "delete %d", job.ID)
return err
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.