buffer

package
v1.0.0-beta.9 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UnsolidCommitmentBuffer

type UnsolidCommitmentBuffer[V comparable] struct {
	// contains filtered or unexported fields
}

func NewUnsolidCommitmentBuffer

func NewUnsolidCommitmentBuffer[V comparable](commitmentBufferMaxSize int, blockBufferMaxSize ...int) *UnsolidCommitmentBuffer[V]

func (*UnsolidCommitmentBuffer[V]) Add

func (u *UnsolidCommitmentBuffer[V]) Add(commitmentID iotago.CommitmentID, value V) bool

func (*UnsolidCommitmentBuffer[V]) AddWithFunc

func (u *UnsolidCommitmentBuffer[V]) AddWithFunc(commitmentID iotago.CommitmentID, value V, addFunc func() bool) (added bool)

func (*UnsolidCommitmentBuffer[V]) EvictUntil

func (u *UnsolidCommitmentBuffer[V]) EvictUntil(slotToEvict iotago.SlotIndex)

func (*UnsolidCommitmentBuffer[V]) GetValues

func (u *UnsolidCommitmentBuffer[V]) GetValues(commitmentID iotago.CommitmentID) []V

func (*UnsolidCommitmentBuffer[V]) GetValuesAndEvict

func (u *UnsolidCommitmentBuffer[V]) GetValuesAndEvict(commitmentID iotago.CommitmentID) []V

func (*UnsolidCommitmentBuffer[V]) Reset

func (u *UnsolidCommitmentBuffer[V]) Reset()

Reset resets the component to a clean state as if it was created at the last commitment.

Jump to

Keyboard shortcuts

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