requestcounter

package
v0.106.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithRequestCounter

func ContextWithRequestCounter(ctx context.Context) context.Context

ContextWithRequestCounter adds a counter to the context if one does not already exist

func GetRequestCount

func GetRequestCount(ctx context.Context) (count uint32)

GetRequestCount retrieves the current request count on the provided context. It returns 0 if the context does not have a request counter

func IncrementRequestCount

func IncrementRequestCount(ctx context.Context)

IncrementRequestCount increments the request counter on the provided context if the context has one

func ResetRequestCount

func ResetRequestCount(ctx context.Context)

ResetRequestCount resets the request counter on the provided context if the context has one

Types

This section is empty.

Jump to

Keyboard shortcuts

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