pool

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constructor

type Constructor func() (Pooler, error)

Constructor is the function prototype used to instantiate a pool.

type Pooler

type Pooler interface {
	Get(int64) (util.SizeReadSeekCloser, bool)
	Put(int64, util.SizeReadSeekCloser) (bool, error)
}

Pooler is the interface implemented by a pool.

func NewNoopPool

func NewNoopPool() (Pooler, error)

NewNoopPool returns a Pooler that doesn't actually pool anything.

func NewPool

func NewPool() (Pooler, error)

NewPool returns a Pooler that uses a LRU strategy to maintain a fixed pool of util.SizeReadSeekCloser's keyed by their stream offset.

Jump to

Keyboard shortcuts

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