beanstalk

package
v0.0.0-...-bb1bb1d Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadFormat      = errors.New("bad format")
	ErrReserveTimeout = errors.New("reserve timeout")
	ErrDeadlineSoon   = errors.New("deadline soon")
	ErrNotFound       = errors.New("not found")
	ErrNotIgnored     = errors.New("not ignored")
)
View Source
var MissingLineEnd = errors.New("expected crlf")

Functions

This section is empty.

Types

type Conn

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

func (*Conn) Addr

func (c *Conn) Addr() net.Addr

type Factory

type Factory func(conn *Conn) Handler

type Handler

type Handler interface {
	Put(pri uint64, delay uint64, ttr uint64, data []byte) (uint64, bool, error)

	Use(tube string) (string, error)

	Reserve(timeout int64) (uint64, []byte, error)

	ReserveByID(id uint64) (uint64, []byte, error)

	Delete(id uint64) error

	Release(id uint64, pri uint64, delay uint64) error

	Bury(id uint64, pri uint64) error

	Touch(id uint64) error

	Watch(tube string) (int, error)

	Ignore(tube string) (int, error)
}

type Server

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

func NewServer

func NewServer(logger *slog.Logger, address string, factory Factory) (*Server, error)

func (*Server) Addr

func (s *Server) Addr() net.Addr

func (*Server) Close

func (s *Server) Close()

func (*Server) Serve

func (s *Server) Serve() error

Jump to

Keyboard shortcuts

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