Go Beanstalkd Client Library

Related tags

Network gobeanstalk
Overview

#gobeanstalk Build Status GoDoc Coverage Status

Go Beanstalkd client library.

INSTALL

go get github.com/iwanbk/gobeanstalk

USAGE

Producer

import (
	"github.com/iwanbk/gobeanstalk"
	"log"
	"time"
)

func main() {
	conn, err := gobeanstalk.Dial("localhost:11300")
	if err != nil {
		log.Fatal(err)
	}

	id, err := conn.Put([]byte("hello"), 0, 10*time.Second, 30*time.Second)
	if err != nil {
		log.Fatal(err)
	}

	log.Printf("Job id %d inserted\n", id)
}

Consumer

import (
	"github.com/iwanbk/gobeanstalk"
	"log"
)

func main() {
	conn, err := gobeanstalk.Dial("localhost:11300")
	if err != nil {
		log.Fatal(err)
	}
	for {
		j, err := conn.Reserve()
		if err != nil {
			log.Fatal(err)
		}
		log.Printf("id:%d, body:%s\n", j.ID, string(j.Body))
		err = conn.Delete(j.ID)
		if err != nil {
			log.Fatal(err)
		}
	}
}

Implemented Commands

  • use
  • put
  • watch
  • ignore
  • reserve
  • delete
  • touch
  • release
  • bury
  • kick
  • kick-job
  • list-tubes
  • stats
  • stats-tube
  • stats-job
  • quit

Release Notes

Latest release is v0.3 that contains API changes, see release notes here

Author

Issues
  • Match parameter types to kr's Go client and C server.

    Match parameter types to kr's Go client and C server.

    Range-limit priority to match the protocol doc and match delay and ttr to the server source. I'm not sure why they're signed, I can't imagine negative times being useful, but that's the way @kr does it.

    opened by BonkaBonka 6
  • implemented Kick, KickJob and ListTUbes and (re)implemented StatsTube, Stats

    implemented Kick, KickJob and ListTUbes and (re)implemented StatsTube, Stats

    I had implemented StatsTube and Stats before you merged pull request #9, but have only just gotten around to sending my pull request. I believe my implementations are better, so I left them in this pull request.

    opened by sb10 1
  • Feature/put unique

    Feature/put unique

    I've added functionality to support put-unique (https://github.com/netsweng/beanstalkd) Don't know how useful it is for you, but thought you might be interested.

    opened by JalfResi 0
  • About yaml-parse

    About yaml-parse

    We now have stats, stats-job, stats-tube. which returns yaml strings.

    But from a user perspective, we do not want to deal with yaml. We want data wraped in yaml, not yaml itself.

    To achieve this, I have API modification related problem and Implementation-related problem

    API modification related problem

    Which one looks good to you?

    1. provides a new api, which returns a dict.
    parsed_item, err := beanstalkc_conn.StatsTube_Parsed("default")
    
    1. Modify the existing API definition. 2a)
    parsed_item, err := beanstalkc_conn.StatsTube("default", func(_ string) map[string]interface{} {
        panic("do something")
    })
    

    2b)

        parsed_item, err:= beanstalkc_conn.StatsTube("default")
    

    Implementation-related problem

    Which one looks good to you?

    Of course. If you prefer 2a, we can leave this to users to decide.

    1. use https://github.com/kr/beanstalk/blob/master/parse.go This will not have any dependence introduced. and since kr used that, It shall looks good to us.

    2. use https://github.com/go-yaml/yaml A huge but seems well-tested library

    opened by slayercat 1
Owner
Iwan Budi Kusnanto
Iwan Budi Kusnanto
Prisma Client Go is an auto-generated and fully type-safe database client

Prisma Client Go Typesafe database access for Go Quickstart • Website • Docs • API reference • Blog • Slack • Twitter Prisma Client Go is an auto-gene

Prisma 1.2k Jul 2, 2022
The Dual-Stack Dynamic DNS client, the world's first dynamic DNS client built for IPv6.

dsddns DsDDNS is the Dual-Stack Dynamic DNS client. A dynamic DNS client keeps your DNS records in sync with the IP addresses associated with your hom

Ryan Young 10 Jun 20, 2022
Go Substrate RPC Client (GSRPC)Go Substrate RPC Client (GSRPC)

Go Substrate RPC Client (GSRPC) Substrate RPC client in Go. It provides APIs and types around Polkadot and any Substrate-based chain RPC calls. This c

Chino Chang 1 Nov 11, 2021
Server and client implementation of the grpc go libraries to perform unary, client streaming, server streaming and full duplex RPCs from gRPC go introduction

Description This is an implementation of a gRPC client and server that provides route guidance from gRPC Basics: Go tutorial. It demonstrates how to u

Joram Wambugu 0 Nov 24, 2021
Godaddy-domains-client-go - Godaddy domains api Client golang - Write automaticly from swagger codegen

Go API client for swagger Overview This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you c

Mickael Stanislas 0 Jan 9, 2022
Tailscale-client-go - A client implementation for the Tailscale HTTP API

tailscale-client-go A client implementation for the Tailscale HTTP API Example p

David Bond 9 Jun 8, 2022
Comunicación de envios de archivos entres cliente-servidor, client-client.

Client - Server - Client Estes es un proyecto simple de comunicacion de envios de archivos del cliente al servidor y viceversamente, y de cliente a cl

Melvin RB 0 Feb 11, 2022
Simple mDNS client/server library in Golang

mdns Simple mDNS client/server library in Golang. mDNS or Multicast DNS can be used to discover services on the local network without the use of an au

HashiCorp 891 Jun 29, 2022
🌧 BitTorrent client and library in Go

rain BitTorrent client and library in Go. Running in production at put.io. Features Core protocol Fast extension Magnet links Multiple trackers UDP tr

Cenk Altı 747 Jul 2, 2022
🐈📦 nyaa.si client library for Go. Fetch Anime, Manga, Music and more torrents

?? ?? go-nyaa nyaa.si client library for Go Built on top of: gofeed - search using RSS colly - scrap torrent details page Original idea: ejnshtein/nya

Ilya Revenko 24 Apr 23, 2022
A minimal filecoin client library

filclient A standalone client library for interacting with the filecoin storage network Features Make storage deals with miners Query storage ask pric

Application Research Group 31 Jun 22, 2022
Go/Golang client library to interact with the Stein API

go-stein This Go / Golang client helps you interact with the Stein API. Stein is a suite of programs to help you turn any Google Sheet to a database.

Nasrul Faizin 3 Oct 18, 2021
GoSNMP is an SNMP client library fully written in Go

GoSNMP is an SNMP client library fully written in Go. It provides Get, GetNext, GetBulk, Walk, BulkWalk, Set and Traps. It supports IPv4 and IPv6, using SNMPv1, SNMPv2c or SNMPv3. Builds are tested against linux/amd64 and linux/386.

Go SNMP 859 Jun 30, 2022
A golang library about socks5, supports all socks5 commands. That Provides server and client and easy to use. Compatible with socks4 and socks4a.

socks5 This is a Golang implementation of the Socks5 protocol library. To see in this SOCKS Protocol Version 5. This library is also compatible with S

chenhao zhang 39 May 29, 2022
Go client library for accessing the Football Data API

football-data-sdk football-data-sdk is a Go client library for accessing the Football Data API. Successful queries return native Go structs. Services

Matheus Tex 12 Mar 15, 2022
Premier ACME client library for Go

acmez - ACME client library for Go ACMEz ("ack-measy" or "acme-zee", whichever you prefer) is a fully-compliant RFC 8555 (ACME) implementation in pure

Matt Holt 162 Jun 29, 2022
Simple REST client library in Go

Simple REST client library in Go Context The goal was to make a minimal library that could be easily reused and expanded in other projects. It doesn't

okay_awright 0 Nov 5, 2021
GoSNMP is an SNMP client library fully written in Go.

GoSNMP is an SNMP client library fully written in Go. It provides Get, GetNext, GetBulk, Walk, BulkWalk, Set and Traps. It supports IPv4 and IPv6, using SNMPv1, SNMPv2c or SNMPv3. Builds are tested against linux/amd64 and linux/386.

uctest 1 Oct 28, 2021