Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CachePublisher ¶
type CachePublisher struct {
// contains filtered or unexported fields
}
func NewCachePublisher ¶
func NewCachePublisher(ctx context.Context, cacheReleasePeriod uint64, subPublisher IMsgPublisher) (*CachePublisher, error)
func (*CachePublisher) PublishMessages ¶
func (p *CachePublisher) PublishMessages(_ context.Context, msgs []*types.SignedMessage) error
type ConcurrentPublisher ¶
type ConcurrentPublisher struct {
// contains filtered or unexported fields
}
ConcurrentPublisher call subPublisher concurrently
func NewConcurrentPublisher ¶
func NewConcurrentPublisher(ctx context.Context, concurrency uint, subPublisher IMsgPublisher) (*ConcurrentPublisher, error)
NewConcurrentPublisher return a ConcurrentPublisher subPublisher should be thread safe
func (*ConcurrentPublisher) PublishMessages ¶
func (p *ConcurrentPublisher) PublishMessages(_ context.Context, msgs []*types.SignedMessage) error
type IMsgPublisher ¶
type IMsgPublisher interface { // PublishMessages publish messages to chain PublishMessages(ctx context.Context, msgs []*types.SignedMessage) error }
func NewIMsgPublisher ¶
func NewIMsgPublisher(ctx context.Context, netParams *types.NetworkParams, cfg *config.PublisherConfig, P2pPublisher *P2pPublisher, rpcPublisher *RpcPublisher) (IMsgPublisher, error)
type MergePublisher ¶
type MergePublisher struct {
// contains filtered or unexported fields
}
func NewMergePublisher ¶
func NewMergePublisher(ctx context.Context, publishers ...IMsgPublisher) *MergePublisher
func (*MergePublisher) AddPublisher ¶
func (p *MergePublisher) AddPublisher(publisher IMsgPublisher)
func (*MergePublisher) PublishMessages ¶
func (p *MergePublisher) PublishMessages(ctx context.Context, msgs []*types.SignedMessage) error
type MessageReceiver ¶
type MessageReceiver chan []*types.SignedMessage
func NewMessageReceiver ¶ added in v1.15.0
func NewMessageReceiver(ctx context.Context, p IMsgPublisher) (MessageReceiver, error)
type P2pPublisher ¶
type P2pPublisher struct {
// contains filtered or unexported fields
}
func NewP2pPublisher ¶
func NewP2pPublisher(pubsub mpubsub.IPubsuber, netName types.NetworkName) (*P2pPublisher, error)
func (*P2pPublisher) PublishMessages ¶
func (p *P2pPublisher) PublishMessages(ctx context.Context, msgs []*types.SignedMessage) error
type RpcPublisher ¶
type RpcPublisher struct {
// contains filtered or unexported fields
}
func NewRpcPublisher ¶
func NewRpcPublisher(ctx context.Context, nodeClient v1.FullNode, nodeProvider repo.INodeProvider, enableMultiNode bool, msgRepo repo.MessageRepo, ) *RpcPublisher
func (*RpcPublisher) PublishMessages ¶
func (p *RpcPublisher) PublishMessages(_ context.Context, msgs []*types.SignedMessage) error
Click to show internal directories.
Click to hide internal directories.