fftm

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 31 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

func InitConfig

func InitConfig()

Types

type ManagedTransactionEventHandler

type ManagedTransactionEventHandler struct {
	Ctx                 context.Context
	ConfirmationManager confirmations.Manager
	WsServer            ws.WebSocketServer
	TxHandler           txhandler.TransactionHandler
}

func (*ManagedTransactionEventHandler) HandleEvent

type Manager

type Manager interface {
	Start() error
	Close()

	APIRouter() *mux.Router

	// API managed event streams have checkpoints stored externally.
	// Events are access by calling PollAPIMangedStream() on the returned stream.
	// - The spec must have a name, but no UUID or type.
	// - The name must be unique to managed API streams (separate namespace to persisted ones)
	// - Multiple calls with the same ID will return the same object.
	// - Use "isNew" to determine if the event stream was freshly initialized from the listener array
	// - If not freshly initialized, the listeners array ignored (you can choose to do check the existing listener list yourself)
	//
	// Checkpoints are commonly tied to individual listeners, so it is critical that the caller manages
	// deterministically the IDs of the listeners passed in. They cannot be empty (an error will be returned)
	GetAPIManagedEventStream(spec *apitypes.EventStream, listeners []*apitypes.Listener) (isNew bool, es eventapi.EventStream, err error)

	// Resources will be used by the stream in the background, so if your object is deleted
	// then this function should be called to clean-up any in-memory state (if there is any
	// possibility you previously called GetAPIManagedEventStream)
	CleanupAPIManagedEventStream(name string) error

	// Access directly to the transaction completions polling interface, which allows blocking-polling interactions with an
	// ordered stream of transaction completions
	TransactionCompletions() txhandler.TransactionCompletions

	// Ability to query a transaction by ID to get full status
	GetTransactionByIDWithStatus(ctx context.Context, txID string, withHistory bool) (transaction *apitypes.TXWithStatus, err error)

	// Ability to reconcile confirmations for a transaction
	// This function uses the single in-memory canonical chain to check and build the confirmation map of a given transaction hash
	ReconcileConfirmationsForTransaction(ctx context.Context, txHash string, existingConfirmations []*ffcapi.MinimalBlockInfo, targetConfirmationCount uint64) (*ffcapi.ConfirmationUpdateResult, error)

	// Ability to submit new transactions into the transaction handler for management/submission
	TransactionHandler() txhandler.TransactionHandler

	// MetricsRegistry returns the metrics registry for this manager for customizing metrics
	MetricsRegistry() metric.MetricsRegistry
}

func NewManager

func NewManager(ctx context.Context, connector ffcapi.API) (Manager, error)

Jump to

Keyboard shortcuts

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