missing

package
v0.8.1-0...-4ef460c Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultStorenodeRequestor

func NewDefaultStorenodeRequestor(store *store.WakuStore) common.StorenodeRequestor

Types

type MessageTracker

type MessageTracker interface {
	MessageExists(pb.MessageHash) (bool, error)
}

MessageTracker should keep track of messages it has seen before and provide a way to determine whether a message exists or not. This is application specific

type MissingMessageVerifier

type MissingMessageVerifier struct {
	C chan *protocol.Envelope
	// contains filtered or unexported fields
}

MissingMessageVerifier is used to periodically retrieve missing messages from store nodes that have some specific criteria

func NewMissingMessageVerifier

func NewMissingMessageVerifier(storenodeRequester common.StorenodeRequestor, messageTracker MessageTracker, timesource timesource.Timesource, logger *zap.Logger, options ...MissingMessageVerifierOption) *MissingMessageVerifier

NewMissingMessageVerifier creates an instance of a MissingMessageVerifier

func (*MissingMessageVerifier) SetCriteriaInterest

func (m *MissingMessageVerifier) SetCriteriaInterest(peerID peer.ID, contentFilter protocol.ContentFilter)

func (*MissingMessageVerifier) Start

func (m *MissingMessageVerifier) Start(ctx context.Context)

func (*MissingMessageVerifier) Stop

func (m *MissingMessageVerifier) Stop()

type MissingMessageVerifierOption

type MissingMessageVerifierOption func(*missingMessageVerifierParams)

MissingMessageVerifierOption is an option that can be used to customize the MissingMessageVerifier behavior

func WithDelay

WithDelay is an option used to indicate the delay to apply for verifying messages

func WithMaxRetryAttempts

func WithMaxRetryAttempts(max int) MissingMessageVerifierOption

WithMaxAttempts indicates how many times will the message verifier retry a failed storenode request

func WithStoreQueryTimeout

func WithStoreQueryTimeout(timeout time.Duration) MissingMessageVerifierOption

WithStoreQueryTimeout sets the timeout for store query

func WithVerificationInterval

func WithVerificationInterval(t time.Duration) MissingMessageVerifierOption

WithVerificationInterval is an option used to setup the verification interval

Jump to

Keyboard shortcuts

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