memory

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBackend

func NewBackend(logger *slog.Logger) backend.Backend

Types

type Backend

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

func (*Backend) Put

func (b *Backend) Put(tube backend.Tube, pri uint64, delay uint64, ttr uint64, data []byte) (uint64, bool, error)

func (*Backend) Reserve

func (b *Backend) Reserve(tubes []backend.Tube, timeout int64) (uint64, []byte, error)

func (*Backend) ResolveTube

func (b *Backend) ResolveTube(name string) backend.Tube

type Job

type Job struct {
	ID          uint64
	Tube        *Tube
	Priority    uint64
	ReleaseTime time.Time
	TTR         uint64
	Data        []byte
}

type Tube

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

func (*Tube) Name

func (t *Tube) Name() string

func (*Tube) Release

func (t *Tube) Release()

func (*Tube) String

func (t *Tube) String() string

Jump to

Keyboard shortcuts

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