drain

package
v5.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 3 Imported by: 2

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