factories

package
v0.22.8-patch-3-fix-co... Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: AGPL-3.0 Imports: 30 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuilderFactory

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

func NewBuilderFactory

func NewBuilderFactory(
	db *badger.DB,
	mainChainHeaders storage.Headers,
	trace module.Tracer,
	metrics module.CollectionMetrics,
	pusher network.Engine,
	opts ...builder.Opt,
) (*BuilderFactory, error)

func (*BuilderFactory) Create

func (f *BuilderFactory) Create(
	clusterHeaders storage.Headers,
	clusterPayloads storage.ClusterPayloads,
	pool mempool.Transactions,
) (module.Builder, *finalizer.Finalizer, error)

type ClusterStateFactory

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

func NewClusterStateFactory

func NewClusterStateFactory(
	db *badger.DB,
	metrics module.CacheMetrics,
	tracer module.Tracer,
) (*ClusterStateFactory, error)

type EpochComponentsFactory

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

func NewEpochComponentsFactory

func NewEpochComponentsFactory(
	me module.Local,
	pools *epochs.TransactionPools,
	builder *BuilderFactory,
	state *ClusterStateFactory,
	hotstuff *HotStuffFactory,
	proposal *ProposalEngineFactory,
	sync *SyncEngineFactory,
) *EpochComponentsFactory

func (*EpochComponentsFactory) Create

func (factory *EpochComponentsFactory) Create(
	epoch protocol.Epoch,
) (
	state cluster.State,
	proposal module.Engine,
	sync module.Engine,
	hotstuff module.HotStuff,
	err error,
)

type HotStuffFactory

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

func NewHotStuffFactory

func NewHotStuffFactory(
	log zerolog.Logger,
	me module.Local,
	aggregator module.AggregatingSigner,
	db *badger.DB,
	protoState protocol.State,
	createMetrics HotStuffMetricsFunc,
	opts ...consensus.Option,
) (*HotStuffFactory, error)

func (*HotStuffFactory) Create

func (f *HotStuffFactory) Create(
	epoch protocol.Epoch,
	cluster protocol.Cluster,
	clusterState cluster.State,
	headers storage.Headers,
	payloads storage.ClusterPayloads,
	builder module.Builder,
	updater module.Finalizer,
	communicator hotstuff.Communicator,
) (*hotstuff.EventLoop, error)

type HotStuffMetricsFunc added in v0.20.0

type HotStuffMetricsFunc func(chainID flow.ChainID) module.HotstuffMetrics

type ProposalEngineFactory

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

func NewProposalEngineFactory

func NewProposalEngineFactory(
	log zerolog.Logger,
	net module.Network,
	me module.Local,
	colMetrics module.CollectionMetrics,
	engMetrics module.EngineMetrics,
	mempoolMetrics module.MempoolMetrics,
	protoState protocol.State,
	transactions storage.Transactions,
) (*ProposalEngineFactory, error)

NewFactory returns a new collection proposal engine factory.

func (*ProposalEngineFactory) Create

func (f *ProposalEngineFactory) Create(clusterState cluster.MutableState, headers storage.Headers, payloads storage.ClusterPayloads) (*compliance.Engine, error)

type SyncEngineFactory

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

func NewSyncEngineFactory

func NewSyncEngineFactory(
	log zerolog.Logger,
	metrics module.EngineMetrics,
	net module.Network,
	me module.Local,
	conf chainsync.Config,
) (*SyncEngineFactory, error)

func (*SyncEngineFactory) Create

func (f *SyncEngineFactory) Create(
	participants flow.IdentityList,
	state cluster.State,
	blocks storage.ClusterBlocks,
	comp network.Engine,
) (*chainsync.Core, *syncengine.Engine, error)

Jump to

Keyboard shortcuts

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