retainer

package
v1.0.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewEvents = event.CreateGroupConstructor(func() (newEvents *Events) {
	return &Events{
		BlockRetained: event.New1[*blocks.Block](),
	}
})

NewEvents contains the constructor of the Events object (it is generated by a generic factory).

Functions

This section is empty.

Types

type BlockRetainer

type BlockRetainer interface {
	BlockMetadata(blockID iotago.BlockID) (*api.BlockMetadataResponse, error)

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

	// Interface embeds the required methods of the module.Module.
	module.Module
}

BlockRetainer keeps and resolves all the block related information needed in the API and INX.

type Events

type Events struct {
	// BlockRetained is triggered when a block is stored in the retainer.
	BlockRetained *event.Event1[*blocks.Block]

	event.Group[Events, *Events]
}

Events is a collection of Retainer related Events.

type TransactionRetainer

type TransactionRetainer interface {
	// TransactionMetadata returns the metadata of a transaction.
	TransactionMetadata(txID iotago.TransactionID) (*api.TransactionMetadataResponse, error)

	// Reset resets the component to a clean state as if it was created at the last commitment.
	Reset(targetSlot iotago.SlotIndex)

	module.Module
}

TransactionRetainer keeps and resolves all the transaction-related metadata needed in the API and INX.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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