ctxreadseeker

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ctxreadseeker wraps a io.ReadSeeker and optionally io.Closer to make it context aware Warning: this might leak a go routine and a reader if underlaying reader can block forever. Only use if it's not an issue, your going to exit soon anyway or there is some other mechism for cleaning up.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, rs io.ReadSeeker) *Reader

func (*Reader) Close

func (r *Reader) Close() (err error)

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

func (*Reader) Seek

func (r *Reader) Seek(offset int64, whence int) (n int64, err error)

Jump to

Keyboard shortcuts

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