pool

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 2 Imported by: 0 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 Entry

type Entry[T any] struct {
	Item     T
	Verified *bool
}

type Pool

type Pool[T any] struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool[T any](maxItemsPerSender int) *Pool[T]

func (*Pool[M]) Entries

func (p *Pool[M]) Entries(seqNr uint64) map[commontypes.OracleID]*Entry[M]

func (*Pool[M]) EntriesWithMinSeqNr

func (p *Pool[M]) EntriesWithMinSeqNr() map[commontypes.OracleID]*Entry[M]

func (*Pool[T]) Put

func (p *Pool[T]) Put(seqNr uint64, sender commontypes.OracleID, item T) PutResult

func (*Pool[M]) ReapDelivered

func (p *Pool[M]) ReapDelivered(deliveredSeqNr uint64)

func (*Pool[M]) StoreVerified

func (p *Pool[M]) StoreVerified(seqNr uint64, sender commontypes.OracleID, verified bool)

type PutResult

type PutResult string
const (
	PutResultOK               PutResult = "ok"
	PutResultDuplicate        PutResult = "duplicate"
	PutResultFull             PutResult = "pool is full for sender"
	PutResultAlreadyDelivered PutResult = "seqNr too low"
)

Jump to

Keyboard shortcuts

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