context-example

command
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package main provides an example of how to use context for timeout and cancellation in the Midaz SDK.

This example demonstrates the following: 1. Setting a timeout on API operations 2. Manually cancelling operations 3. Handling context cancellation errors 4. Using the client's WithContext method for operation groups 5. Proper resource cleanup on cancellation 6. Real-world API call cancellation

Jump to

Keyboard shortcuts

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