Documentation ¶
Index ¶
- type Manager
- func (m *Manager) Context() *flowcontext.FlowContext
- func (m *Manager) RegisterFlow(name string, router *routerpkg.Router, ...) *common.Flow
- func (m *Manager) RegisterFlowWithCapacity(name string, capacity int, router *routerpkg.Router, ...) *common.Flow
- func (m *Manager) RegisterOneTimeFlow(name string, router *routerpkg.Router, ...) *common.Flow
- func (m *Manager) SetOnNewBlockTemplateHandler(onNewBlockTemplateHandler flowcontext.OnNewBlockTemplateHandler)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages the p2p protocol
func NewManager ¶
func NewManager(cfg *infraconfig.Config, netAdapter *netadapter.NetAdapter, addressManager *addressmanager.AddressManager, connectionManager *commanager.ConnectionManager) (*Manager, error)
NewManager creates a new instance of the p2p protocol manager
func (*Manager) Context ¶
func (m *Manager) Context() *flowcontext.FlowContext
func (*Manager) RegisterFlow ¶
func (m *Manager) RegisterFlow(name string, router *routerpkg.Router, messageTypes []appmessage.MessageCommand, isStopping *uint32, errChan chan error, initializeFunc common.FlowInitializeFunc) *common.Flow
RegisterFlow registers a flow to the given router.
func (*Manager) RegisterFlowWithCapacity ¶
func (m *Manager) RegisterFlowWithCapacity(name string, capacity int, router *routerpkg.Router, messageTypes []appmessage.MessageCommand, isStopping *uint32, errChan chan error, initializeFunc common.FlowInitializeFunc) *common.Flow
RegisterFlowWithCapacity registers a flow to the given router with a custom capacity.
func (*Manager) RegisterOneTimeFlow ¶
func (m *Manager) RegisterOneTimeFlow(name string, router *routerpkg.Router, messageTypes []appmessage.MessageCommand, isStopping *uint32, stopChan chan error, initializeFunc common.FlowInitializeFunc) *common.Flow
RegisterOneTimeFlow registers a one-time flow (that exits once some operations are done) to the given router.
func (*Manager) SetOnNewBlockTemplateHandler ¶
func (m *Manager) SetOnNewBlockTemplateHandler(onNewBlockTemplateHandler flowcontext.OnNewBlockTemplateHandler)
SetOnNewBlockTemplateHandler sets the onNewBlockTemplate handler
Click to show internal directories.
Click to hide internal directories.