pending

package
v0.17.20 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler handles waiting for pending requests and responses

func NewHandler

func NewHandler(size int) Handler

NewHandler new instance of PendingHandler

func (*Handler) DecPending

func (pending *Handler) DecPending()

DecPending increase finished requests

func (*Handler) IncPending

func (pending *Handler) IncPending()

IncPending increase pending requests

func (*Handler) QueueRequest

func (pending *Handler) QueueRequest(baseCtx context.Context, timeout time.Duration,
	f func(ctx context.Context) error, logEntry *logger.LogEntry, onFinished func(err error))

QueueRequest Async request,

func (*Handler) WaitForPending

func (pending *Handler) WaitForPending(ctx context.Context)

WaitForPending uses double locking of mutex to wait until mutex is unlocked by loop listening for pending req/resp

Jump to

Keyboard shortcuts

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