retry

package
v0.5.0-alpha Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetryableAssignmentOperation

func RetryableAssignmentOperation(ctx context.Context, operation string, fn func() error) error

RetryableAssignmentOperation executes an assignment operation with specific rate limiting

func RetryableIntuneOperation

func RetryableIntuneOperation(ctx context.Context, operation string, opType IntuneOperationType, fn func() error) error

RetryableIntuneOperation executes an Intune operation with specific rate limiting

func RetryableOperation

func RetryableOperation(ctx context.Context, operation string, fn func() error) error

RetryableOperation executes an operation with automatic retry on rate limit errors

Types

type IntuneOperationType

type IntuneOperationType string

IntuneOperationType defines the type of Intune operation

const (
	IntuneWrite IntuneOperationType = "Write" // POST, PUT, DELETE, PATCH
	IntuneRead  IntuneOperationType = "Read"  // GET and others
)

type ThrottleScope

type ThrottleScope struct {
	Scope         string
	Limit         string
	ApplicationID string
	ResourceID    string
}

ThrottleScope represents the scope of throttling from x-ms-throttle-scope header

Jump to

Keyboard shortcuts

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