Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdStats ¶
type AdStats struct { NonRmCount int RmCount int AdNoLongerProvidedCount int // contains filtered or unexported fields }
func NewAdStats ¶
func (*AdStats) NonRmChunkStats ¶
func (a *AdStats) NonRmChunkStats() stats.Float64Data
func (*AdStats) NonRmMhStats ¶
func (a *AdStats) NonRmMhStats() stats.Float64Data
func (*AdStats) Sample ¶
func (a *AdStats) Sample(ad *Advertisement) *AdSample
func (*AdStats) TotalAdCount ¶
func (*AdStats) UniqueContextIDCount ¶
type Advertisement ¶
type Advertisement struct { ID cid.Cid PreviousID cid.Cid ProviderID peer.ID ContextID []byte Metadata []byte Addresses []string Signature []byte Entries *EntriesIterator IsRemove bool ExtendedProvider *schema.ExtendedProvider }
func (*Advertisement) HasEntries ¶
func (a *Advertisement) HasEntries() bool
type EntriesIterator ¶
type EntriesIterator struct {
// contains filtered or unexported fields
}
func (*EntriesIterator) ChunkCount ¶
func (d *EntriesIterator) ChunkCount() int
ChunkCount returns the number of current chunk in iteration. This function returns the final count of entries chunk when iteration reaches its end, i.e. calling EntriesIterator.Next returns io.EOF error.
func (*EntriesIterator) Drain ¶
func (d *EntriesIterator) Drain() ([]multihash.Multihash, error)
func (*EntriesIterator) IsPresent ¶
func (d *EntriesIterator) IsPresent() bool
func (*EntriesIterator) Next ¶
func (d *EntriesIterator) Next() (multihash.Multihash, error)
func (*EntriesIterator) Root ¶
func (d *EntriesIterator) Root() cid.Cid
type Option ¶
type Option func(*options) error
func WithEntriesRecursionLimit ¶
func WithEntriesRecursionLimit(limit selector.RecursionLimit) Option
WithEntriesRecursionLimit sets the recursion limit when syncing advertisement entries chain. Defaults to no limit.
func WithMaxSyncRetry ¶
WithMaxSyncRetry sets the maximum number of times to retry a failed sync. Defaults to 10 if unset.
func WithSyncRetryBackoff ¶
WithSyncRetryBackoff sets the length of time to wait before retrying a faild sync. Defaults to 500ms if unset.
func WithTopicName ¶
WithTopicName sets the topic name on which the provider announces advertised content. Defaults to '/indexer/ingest/mainnet'.
type ProviderClient ¶
type ProviderClient interface { GetAdvertisement(ctx context.Context, id cid.Cid) (*Advertisement, error) Close() error }
func NewProviderClient ¶
func NewProviderClient(provAddr peer.AddrInfo, o ...Option) (ProviderClient, error)
type ProviderClientStore ¶
type ProviderClientStore struct { datastore.Batching ipld.LinkSystem }
type VerifyIngestResult ¶
type VerifyIngestResult struct { TotalMhChecked int ProviderMismatch int Present int Absent int FailedToVerify int Errs []error AbsentMhs []multihash.Multihash }
func VerifyIngestFromMhs ¶
func VerifyIngestFromMhs(finder *httpfinderclient.Client, wantProvID string, mhs []multihash.Multihash) (*VerifyIngestResult, error)
func (*VerifyIngestResult) Add ¶
func (r *VerifyIngestResult) Add(other *VerifyIngestResult)
func (*VerifyIngestResult) PassedVerification ¶
func (r *VerifyIngestResult) PassedVerification() bool