queue

package
v0.0.0-...-8bd6b7d Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyMessageErr = fmt.Errorf("no messages found")

Functions

This section is empty.

Types

type MockQueue

type MockQueue struct {
	mock.Mock
}

func (*MockQueue) PullMessage

func (q *MockQueue) PullMessage(ctx context.Context, wait int) (res []byte, err error)

func (*MockQueue) Purge

func (q *MockQueue) Purge(ctx context.Context) error

func (*MockQueue) PushMessage

func (q *MockQueue) PushMessage(ctx context.Context, i any) error

type PullPoll

type PullPoll interface {
	Purge(context.Context) error
	PullMessage(context.Context, int) ([]byte, error)
	PushMessage(context.Context, any) error
}

type Queue

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

func NewQueue

func NewQueue(queueUri string) *Queue

func (*Queue) PullMessage

func (q *Queue) PullMessage(ctx context.Context, wait int) ([]byte, error)

func (*Queue) Purge

func (q *Queue) Purge(ctx context.Context) error

func (*Queue) PushMessage

func (q *Queue) PushMessage(ctx context.Context, i any) error

Jump to

Keyboard shortcuts

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