continuationinput

package
v0.182.6 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package continuationinput reads bounded continuation inputs with their existing file safety policies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadBounded

func ReadBounded(reader io.Reader, limit int, label string) ([]byte, error)

func ReadHandover

func ReadHandover(input io.Reader, path string, limit int) ([]byte, error)

func ReadRegularFile

func ReadRegularFile(path string, limit int) ([]byte, error)

Types

type Effects

type Effects struct {
	Abs           func(string) (string, error)
	ResolveParent func(string) (string, error)
	Open          func(string, int) (int, error)
	OpenAt        func(int, string, int) (int, error)
	Close         func(int) error
	Fstat         func(int, *unix.Stat_t) error
	File          func(uintptr, string) ReadSeekCloser
	OpenHandover  func(string) (HandoverFile, error)
}

Effects contains the concrete descriptor and file operations used by Reader. On successful OpenAt, File must wrap the same live identity into a nonnil owned reader. Native Unix and Windows open success both satisfy this contract.

func DefaultEffects

func DefaultEffects() Effects

type HandoverFile

type HandoverFile interface {
	io.Reader
	io.Closer
	Stat() (os.FileInfo, error)
}

type ReadSeekCloser

type ReadSeekCloser interface {
	io.Reader
	io.Seeker
	io.Closer
}

type Reader

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

func New

func New(effects Effects) *Reader

func (*Reader) ReadHandover

func (r *Reader) ReadHandover(input io.Reader, path string, limit int) ([]byte, error)

func (*Reader) ReadRegularFile

func (r *Reader) ReadRegularFile(path string, limit int) ([]byte, error)

Jump to

Keyboard shortcuts

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