util

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReadCloserWithContextCancelFunc added in v1.5.0

func NewReadCloserWithContextCancelFunc(readCloser io.ReadCloser, cancel context.CancelFunc) io.ReadCloser

Types

type ReadCloserWithContextCancelFunc added in v1.5.0

type ReadCloserWithContextCancelFunc struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

ReadCloserWithContextCancelFunc helps with cancelling the context when closing a ReadCloser. NOTE: The consumer of ReadCloserWithContextCancelFunc should always call the Close method when it is done reading which otherwise could cause a resource leak.

func (ReadCloserWithContextCancelFunc) Close added in v1.5.0

Jump to

Keyboard shortcuts

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