Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChCollector ¶
type ChCollector interface { GetData() <-chan *collectordto.BlockData Close() }
ChCollector is component that collects data from the source channel.
type ChCollectorCreator ¶
type ChCollectorCreator func(ctx context.Context, dataReady chan<- struct{}, srcChName string, startFrom uint64) (ChCollector, error)
ChCollectorCreator is a function that creates a new ChCollector
type ChExecutor ¶
type ChExecutor interface { // CalcBatchSize calculates and returns batch size (in bytes) which will be sent to chaincode, // in method Execute CalcBatchSize(b *executordto.Batch) (uint, error) // Execute sends batch to chaincode and returns num of block in which batch was committed. // minHeight - the minimum height that peers must have in order to execute batch Execute(ctx context.Context, b *executordto.Batch, minHeight uint64) (uint64, error) Close() }
ChExecutor is component that performs actions related to the execution of a batch.
type ChExecutorCreator ¶
type ChExecutorCreator func(ctx context.Context) (ChExecutor, error)
ChExecutorCreator is a function that creates a new ChExecutor
type ChRobot ¶
type ChRobot struct {
// contains filtered or unexported fields
}
ChRobot is a robot that collects data from the source channels and sends it to the destination channel.
func NewRobot ¶
func NewRobot(ctx context.Context, chName string, initMinExecBlockNum uint64, chsSources map[string]uint64, collectorCr ChCollectorCreator, chExecutorCr ChExecutorCreator, chStor ChStorage, batchLimits collectorbatch.Limits, ) *ChRobot
NewRobot creates a new robot
type ChStorage ¶
type ChStorage interface { SaveCheckPoints(ctx context.Context, cp *stordto.ChCheckPoint) (*stordto.ChCheckPoint, error) LoadCheckPoints(ctx context.Context) (*stordto.ChCheckPoint, bool, error) }
ChStorage is a interface for save and load checkpoints
Click to show internal directories.
Click to hide internal directories.