beanstalkclient

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *beanstalk.Conn, name string) *beanstalkClient

Types

type Client

type Client interface {
	Put(body []byte, pri uint32, delay, ttr time.Duration) (id uint64, err error)
	PeekReady() (id uint64, body []byte, err error)
	PeekDelayed() (id uint64, body []byte, err error)
	PeekBuried() (id uint64, body []byte, err error)
	Kick(bound int) (n int, err error)
	Stats() (map[string]string, error)
	Pause(d time.Duration) error
}

func NewMock

func NewMock(name string) Client

func NewMockWillPut

func NewMockWillPut(name string, body string, id uint64) Client

type MockClient

type MockClient struct {
	Name string
	// contains filtered or unexported fields
}

func (*MockClient) ExpectPut

func (c *MockClient) ExpectPut(body string, id uint64)

func (*MockClient) Kick

func (c *MockClient) Kick(bound int) (n int, err error)

func (*MockClient) Pause

func (c *MockClient) Pause(d time.Duration) error

func (*MockClient) PeekBuried

func (c *MockClient) PeekBuried() (id uint64, body []byte, err error)

func (*MockClient) PeekDelayed

func (c *MockClient) PeekDelayed() (id uint64, body []byte, err error)

func (*MockClient) PeekReady

func (c *MockClient) PeekReady() (id uint64, body []byte, err error)

func (*MockClient) Put

func (c *MockClient) Put(body []byte, pri uint32, delay, ttr time.Duration) (id uint64, err error)

func (*MockClient) Stats

func (c *MockClient) Stats() (map[string]string, error)

type MockConn

type MockConn struct {
}

Jump to

Keyboard shortcuts

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