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() }
type ChCollectorCreator ¶
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)
type ChRobot ¶
type ChRobot struct {
// contains filtered or unexported fields
}
func CreateRobots ¶ added in v0.0.3
func CreateRobots(ctx context.Context, cfg *config.Config, hlfProfile *hlfprofile.HlfProfile) ([]*ChRobot, error)
CreateRobots - creates robots specified by config
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
func (*ChRobot) Collectors ¶ added in v0.0.3
func (chr *ChRobot) Collectors() []*chCollector
func (*ChRobot) CreateCollectors ¶ added in v0.0.3
CreateCollectors - creates robot collectors
type ChStorage ¶
type ChStorage interface { SaveCheckPoints(ctx context.Context, cp *stordto.ChCheckPoint) (*stordto.ChCheckPoint, error) LoadCheckPoints(ctx context.Context) (*stordto.ChCheckPoint, bool, error) }
Click to show internal directories.
Click to hide internal directories.