allocator

package
v0.13.12 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

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

func NewAllocator

func NewAllocator(maxAllowedAllocatedTotal uint64, maxAllowedAllocatedPerPeer uint64) *Allocator

func (*Allocator) AllocateBlockMemory

func (a *Allocator) AllocateBlockMemory(p peer.ID, amount uint64) <-chan error

func (*Allocator) AllocatedForPeer

func (a *Allocator) AllocatedForPeer(p peer.ID) uint64

func (*Allocator) ReleaseBlockMemory

func (a *Allocator) ReleaseBlockMemory(p peer.ID, amount uint64) error

func (*Allocator) ReleasePeerMemory

func (a *Allocator) ReleasePeerMemory(p peer.ID) error

func (*Allocator) Stats

func (a *Allocator) Stats() graphsync.ResponseStats

Jump to

Keyboard shortcuts

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