Documentation
¶
Index ¶
- type ChainExchange
- type Listener
- type Message
- type Option
- func WithListener(listener Listener) Option
- func WithMaxChainLength(length int) Option
- func WithMaxDiscoveredChainsPerInstance(max int) Option
- func WithMaxInstanceLookahead(lookahead uint64) Option
- func WithMaxTimestampAge(max time.Duration) Option
- func WithMaxWantedChainsPerInstance(max int) Option
- func WithProgress(progress gpbft.Progress) Option
- func WithPubSub(pubsub *pubsub.PubSub) Option
- func WithSubscriptionBufferSize(size int) Option
- func WithTopicName(name string) Option
- func WithTopicScoreParams(params *pubsub.TopicScoreParams) Option
- type PubSubChainExchange
- func (p *PubSubChainExchange) Broadcast(ctx context.Context, msg Message) (_err error)
- func (p *PubSubChainExchange) GetChainByInstance(ctx context.Context, instance uint64, key gpbft.ECChainKey) (*gpbft.ECChain, bool)
- func (p *PubSubChainExchange) RemoveChainsByInstance(ctx context.Context, instance uint64) error
- func (p *PubSubChainExchange) Shutdown(context.Context) error
- func (p *PubSubChainExchange) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainExchange ¶
type Option ¶
type Option func(*options) error
func WithListener ¶
func WithMaxChainLength ¶
func WithMaxTimestampAge ¶
func WithProgress ¶
func WithPubSub ¶
func WithTopicName ¶
func WithTopicScoreParams ¶
func WithTopicScoreParams(params *pubsub.TopicScoreParams) Option
type PubSubChainExchange ¶
type PubSubChainExchange struct {
// contains filtered or unexported fields
}
func NewPubSubChainExchange ¶
func NewPubSubChainExchange(o ...Option) (*PubSubChainExchange, error)
func (*PubSubChainExchange) Broadcast ¶
func (p *PubSubChainExchange) Broadcast(ctx context.Context, msg Message) (_err error)
func (*PubSubChainExchange) GetChainByInstance ¶
func (p *PubSubChainExchange) GetChainByInstance(ctx context.Context, instance uint64, key gpbft.ECChainKey) (*gpbft.ECChain, bool)
func (*PubSubChainExchange) RemoveChainsByInstance ¶
func (p *PubSubChainExchange) RemoveChainsByInstance(ctx context.Context, instance uint64) error
Click to show internal directories.
Click to hide internal directories.