pool

package
v0.0.0-...-7f9930a Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2015 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

A cache holds a set of reusable objects. The slice is a stack (LIFO). If more are needed, the cache creates them by calling new.

func NewCache

func NewCache(name string, cap int, f func() interface{}) *Cache

func (*Cache) Get

func (c *Cache) Get() interface{}

func (*Cache) Put

func (c *Cache) Put(x interface{})

Jump to

Keyboard shortcuts

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