buffer

package
v1.0.0-alpha.25 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

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