resourcemanager

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceManager

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

func New

func New(limit int64) *ResourceManager

func (*ResourceManager) Close

func (m *ResourceManager) Close()

func (*ResourceManager) Release

func (m *ResourceManager) Release(n int64)

func (*ResourceManager) Request

func (m *ResourceManager) Request(key string, data interface{}, n int64, notifyC chan interface{}, cancelC chan struct{}) (acquired bool)

func (*ResourceManager) Stats

func (m *ResourceManager) Stats() Stats

type Stats

type Stats struct {
	Used  int64
	Count int
}

Jump to

Keyboard shortcuts

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