Documentation ¶
Index ¶
- Variables
- func ArchiveName(providerID peer.ID) string
- type GCAd
- type GCState
- type GCStats
- type Option
- func WithCarCompress(alg string) Option
- func WithCarDelete(del bool) Option
- func WithCarRead(rd bool) Option
- func WithDatastoreDir(dir string) Option
- func WithDatastoreTempDir(dir string) Option
- func WithDeleteNotFound(dnf bool) Option
- func WithEntriesDepthLimit(depthLimit int64) Option
- func WithEntriesFromPublisher(entsFromPub bool) Option
- func WithHttpTimeout(to time.Duration) Option
- func WithLibp2pHost(h host.Host) Option
- func WithPCache(pc *pcache.ProviderCache) Option
- func WithSegmentSize(size int) Option
- func WithSyncSegmentSize(size int) Option
- func WithTopicName(topic string) Option
- type Reaper
Constants ¶
This section is empty.
Variables ¶
var ( ErrProviderNotFound = errors.New("provider not found") ErrNoCarReader = errors.New("car reader not available") )
Functions ¶
func ArchiveName ¶
Types ¶
type GCStats ¶
type Option ¶
type Option func(*config) error
Option is a function that sets a value in a config.
func WithCarCompress ¶
WithCarCompress configures CAR file compression.
func WithCarDelete ¶
WithCarDelete deletes CAR files that have no multihash content, including CAR file for removal and address update advertisements.
func WithCarRead ¶
WithCarRead sets whether or not entries are read from CAR files. Only set to false if CAR file exist, but do not contain needed entries data.
func WithDatastoreDir ¶
WithDatastoreDir tells GC the directory to use as the parent for all provider-specific datastores.
func WithDatastoreTempDir ¶
WithDatastoreTempDir tells GC the directory to use as the parent for all provider-specific temproary datastores.
func WithDeleteNotFound ¶
WithDeleteNotFound causes all index content for a provider to be deleted if that provider is not found in any of the sources of provider information.
func WithEntriesDepthLimit ¶
WithEntriesDepthLimit sets the depth limit when syncing an advertisement entries chain. Setting to 0 means no limit.
func WithEntriesFromPublisher ¶
WithEntriesFromPublisher allows fetching advertisement entries from the publisher if they cannot be fetched from a CAR file.
func WithHttpTimeout ¶
WithHttpTimeout sets the timeout for http and libp2phttp connections.
func WithLibp2pHost ¶
WithLibp2pHost configures gc to use an existing libp2p host to connect to publishers.
func WithPCache ¶
func WithPCache(pc *pcache.ProviderCache) Option
func WithSegmentSize ¶
WithSegmentSize sets the size of the segments that the ad chain is broken into for processing after syncing.
func WithSyncSegmentSize ¶
WithSyncSegmentSize sets sice that the ad chain is broken into when syncing.
func WithTopicName ¶
WithTopicName sets the topic name on which the provider announces advertised content. Defaults to '/indexer/ingest/mainnet'.