dsl

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchStored

func BatchStored(m dsl.Module, dest t.ModuleID, origin *batchdbpb.StoreBatchOrigin)

BatchStored is a response to a StoreBatch event.

func LookupBatch

func LookupBatch[C any](m dsl.Module, dest t.ModuleID, batchID t.BatchID, context *C)

LookupBatch is used to pull a batch with its metadata from the local batch database.

func LookupBatchResponse

func LookupBatchResponse(m dsl.Module, dest t.ModuleID, found bool, txs []*requestpb.Request, metadata []byte, origin *batchdbpb.LookupBatchOrigin)

LookupBatchResponse is a response to a LookupBatch event.

func StoreBatch

func StoreBatch[C any](m dsl.Module, dest t.ModuleID, batchID t.BatchID, txIDs []t.TxID, txs []*requestpb.Request, metadata []byte, context *C)

StoreBatch is used to store a new batch in the local batch database.

func UponBatchStored

func UponBatchStored[C any](m dsl.Module, handler func(context *C) error)

UponBatchStored registers a handler for the BatchStored events.

func UponEvent

func UponEvent[EvWrapper batchdbpb.Event_TypeWrapper[Ev], Ev any](m dsl.Module, handler func(ev *Ev) error)

UponEvent registers a handler for the given batchdb event type.

func UponLookupBatch

func UponLookupBatch(m dsl.Module, handler func(batchID t.BatchID, origin *batchdbpb.LookupBatchOrigin) error)

UponLookupBatch registers a handler for the LookupBatch events.

func UponLookupBatchResponse

func UponLookupBatchResponse[C any](m dsl.Module, handler func(found bool, txs []*requestpb.Request, metadata []byte, context *C) error)

UponLookupBatchResponse registers a handler for the LookupBatchResponse events.

func UponStoreBatch

func UponStoreBatch(m dsl.Module, handler func(batchID t.BatchID, txIDs []t.TxID, txs []*requestpb.Request, metadata []byte, origin *batchdbpb.StoreBatchOrigin) error)

UponStoreBatch registers a handler for the StoreBatch events.

Types

This section is empty.

Jump to

Keyboard shortcuts

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