Help us shape the future of Go! Take the 2026 Go Developer Survey

drain

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithError

func WithError(drainer Drainer, reader io.Reader, err error) error

Types

type BehaviorSeedLimitedDrainer

type BehaviorSeedLimitedDrainer struct {
	DrainSize int
}

func (*BehaviorSeedLimitedDrainer) AcknowledgeReceive

func (d *BehaviorSeedLimitedDrainer) AcknowledgeReceive(size int)

func (*BehaviorSeedLimitedDrainer) Drain

func (d *BehaviorSeedLimitedDrainer) Drain(reader io.Reader) error

type Drainer

type Drainer interface {
	AcknowledgeReceive(size int)
	Drain(reader io.Reader) error
}

func NewBehaviorSeedLimitedDrainer

func NewBehaviorSeedLimitedDrainer(behaviorSeed int64, drainFoundation, maxBaseDrainSize, maxRandDrain int) (Drainer, error)

func NewNopDrainer

func NewNopDrainer() Drainer

type NopDrainer

type NopDrainer struct{}

func (NopDrainer) AcknowledgeReceive

func (n NopDrainer) AcknowledgeReceive(size int)

func (NopDrainer) Drain

func (n NopDrainer) Drain(reader io.Reader) error

Jump to

Keyboard shortcuts

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