Documentation
¶
Index ¶
- func New(c *beanstalk.Conn, name string) *beanstalkClient
- type Client
- type MockClient
- func (c *MockClient) ExpectPut(body string, id uint64)
- func (c *MockClient) Kick(bound int) (n int, err error)
- func (c *MockClient) Pause(d time.Duration) error
- func (c *MockClient) PeekBuried() (id uint64, body []byte, err error)
- func (c *MockClient) PeekDelayed() (id uint64, body []byte, err error)
- func (c *MockClient) PeekReady() (id uint64, body []byte, err error)
- func (c *MockClient) Put(body []byte, pri uint32, delay, ttr time.Duration) (id uint64, err error)
- func (c *MockClient) Stats() (map[string]string, error)
- type MockConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
}
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) PeekBuried ¶
func (c *MockClient) PeekBuried() (id uint64, body []byte, err error)
func (*MockClient) PeekDelayed ¶
func (c *MockClient) PeekDelayed() (id uint64, body []byte, err error)
Click to show internal directories.
Click to hide internal directories.