beanstalkd

package
v0.0.0-...-7f81a18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package beanstalkd is a higher level wrapper to utilize beanstalkd as a simple message queue. It removes some good features like reserve-delete mechanism, reserve with timeout, etc. Offical beanstalk libary should be used for such features. NOTE: This client doesn't support concurrent Get/Put operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func Dial

func Dial(addr string, tubeName string) *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) Get

func (c *Client) Get() []byte

Get returns a job from a tube, blocking.

func (*Client) GetOrNull

func (c *Client) GetOrNull() []byte

Get returns a job from a tube. Non-blocking. When no jobs, return nil.

func (*Client) Len

func (c *Client) Len() int

func (*Client) Put

func (c *Client) Put(d []byte) error

Put the data into tube.

func (*Client) PutWithPriority

func (c *Client) PutWithPriority(d []byte, pri uint32) error

func (*Client) Reconnect

func (c *Client) Reconnect() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL