ctxio

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ctxio provides context-aware io.ReadCloser and io.WriteCloser implementations that handle cancellations during blocking read/write operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReader

func NewReader(ctx context.Context, r io.Reader) io.ReadCloser

NewReader returns a context-aware io.ReadCloser that reads from the given reader r. Cancellation works even if the reader is blocked on read. Closing the returned io.ReadCloser will not close the underlying reader.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳