pool

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: EUPL-1.2 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryPool

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

func NewMemoryPool

func NewMemoryPool(size, lwm, hwm uint64, start, length uint, maxCores int) *MemoryPool

func (*MemoryPool) AddNewPrimeToBuffer

func (s *MemoryPool) AddNewPrimeToBuffer()

AddNewPrimeToBuffer will generate a new prime and add it to the buffer if not already full

func (*MemoryPool) Fetch

func (s *MemoryPool) Fetch(desiredStart, desiredLength uint) (*big.Int, error)

Fetch a new prime directly from our in-memory buffer

func (*MemoryPool) IsFull

func (s *MemoryPool) IsFull() bool

func (*MemoryPool) Stats added in v0.5.1

func (s *MemoryPool) Stats() Stats

func (*MemoryPool) StatsJSON

func (s *MemoryPool) StatsJSON() ([]byte, error)

type Stats added in v0.5.1

type Stats struct {
	Name       string
	Size       uint64
	Index      uint64
	Hwm        uint64
	Lwm        uint64
	Depleted   bool
	Depletions uint
	BitStart   uint
	BitLength  uint
}

Jump to

Keyboard shortcuts

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