pending

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 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() 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