space

package
v2.6.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 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 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(r address.Range) (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(r address.Range) (address.Range, bool)

func (*Space) Free

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

func (*Space) NumFreeAddresses

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

func (*Space) NumFreeAddressesInRange

func (s *Space) NumFreeAddressesInRange(r address.Range) address.Count

func (*Space) NumOwnedAddresses added in v1.8.0

func (s *Space) NumOwnedAddresses() address.Count

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