space

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr

type Addr address.Address

type Space

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

func New

func New() *Space

func (*Space) Add

func (s *Space) Add(start address.Address, size address.Offset)

func (*Space) AddRanges

func (s *Space) AddRanges(ranges []address.Range)

Create a Space that has free space in all the supplied Ranges.

func (*Space) Allocate

func (s *Space) Allocate() (bool, address.Address)

func (*Space) Claim

func (s *Space) Claim(addr address.Address) error

func (*Space) Clear

func (s *Space) Clear()

Clear removes all spaces from this space set. Used during node shutdown.

func (*Space) Donate

func (s *Space) Donate() (address.Address, address.Offset, bool)

func (*Space) Free

func (s *Space) Free(addr address.Address) error

func (*Space) NumFreeAddresses

func (s *Space) NumFreeAddresses() address.Offset

func (*Space) NumFreeAddressesInRange

func (s *Space) NumFreeAddressesInRange(start, end address.Address) address.Offset

func (*Space) OwnedRanges

func (s *Space) OwnedRanges() []address.Range

OwnedRanges returns slice of Ranges, ordered by IP, gluing together contiguous sequences of owned and free addresses

func (*Space) String

func (s *Space) String() string

func (*Space) UpdateRanges

func (s *Space) UpdateRanges(ranges []address.Range)

Taking ranges to be a set of all space we should own, add in any excess as free space

Jump to

Keyboard shortcuts

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