ledger

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *ledger

func NewEventBasedProvider

func NewEventBasedProvider(
	bdp *BlockDispatcherProvider,
) *eventBasedProvider

Types

type BlockDispatcher

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

func (*BlockDispatcher) AddCallback

func (s *BlockDispatcher) AddCallback(f driver.BlockCallback)

func (*BlockDispatcher) OnBlock

func (s *BlockDispatcher) OnBlock(ctx context.Context, block *cb.Block) (bool, error)

type BlockDispatcherProvider

type BlockDispatcherProvider struct {
	lazy.Provider[netCh, *BlockDispatcher]
}

func NewBlockDispatcherProvider

func NewBlockDispatcherProvider() *BlockDispatcherProvider

func (*BlockDispatcherProvider) GetBlockDispatcher

func (p *BlockDispatcherProvider) GetBlockDispatcher(network, channel string) (*BlockDispatcher, error)

type Provider

type Provider interface {
	NewLedger(network, channel string) (driver.Ledger, error)
}

Provider provides ledger implementations to access transactions and blocks on the ledger. The ledger can be accessed in various ways, e.g. using the chaincode or listening on the delivery endpoint However, FabricX does not invoke the chaincode to access blocks and transactions.

Jump to

Keyboard shortcuts

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