committer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFinalityListenerManagerProvider

func NewFinalityListenerManagerProvider[V comparable](tracerProvider trace.TracerProvider) *finalityListenerManagerProvider[V]

Types

type AggregatedTransactionFilter

type AggregatedTransactionFilter struct {
	// contains filtered or unexported fields
}

func NewAggregatedTransactionFilter

func NewAggregatedTransactionFilter() *AggregatedTransactionFilter

func (*AggregatedTransactionFilter) Accept

func (f *AggregatedTransactionFilter) Accept(txID string, env []byte) (bool, error)

func (*AggregatedTransactionFilter) Add

type FinalityManager

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

FinalityManager manages events for the commit pipeline. It consists of a central queue of events. The queue is fed by multiple sources. A single thread reads from this queue and invokes the listeners in a blocking way

func NewFinalityManager

func NewFinalityManager[V comparable](listenerManager driver.ListenerManager[V], logger Logger, vault Vault[V], tracerProvider trace.TracerProvider, eventQueueWorkers int, statuses ...V) *FinalityManager[V]

func (*FinalityManager[V]) AddListener

func (c *FinalityManager[V]) AddListener(txID driver.TxID, toAdd driver.FinalityListener[V]) error

func (*FinalityManager[V]) Post

func (c *FinalityManager[V]) Post(event driver.FinalityEvent[V])

func (*FinalityManager[V]) RemoveListener

func (c *FinalityManager[V]) RemoveListener(txID driver.TxID, toRemove driver.FinalityListener[V])

func (*FinalityManager[V]) Run

func (c *FinalityManager[V]) Run(context context.Context)

type Logger

type Logger interface {
	Debugf(template string, args ...interface{})
	Infof(template string, args ...interface{})
	Warnf(template string, args ...interface{})
	Errorf(template string, args ...interface{})
}

type Vault

type Vault[V comparable] interface {
	Statuses(ids ...string) ([]driver.TxValidationStatus[V], error)
}

Jump to

Keyboard shortcuts

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