allocator

package
v0.17.0 Latest Latest
Warning

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

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

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 added in v0.10.3

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

Jump to

Keyboard shortcuts

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