Documentation ¶
Index ¶
- type Option
- func SkipNotification() Option
- func WithCachingQueue(cachingQueue blobindexlookup.CachingQueue) Option
- func WithClaimsClient(client redis.Client) Option
- func WithClaimsStore(store types.ContentClaimsStore) Option
- func WithDataPath(dataPath string) Option
- func WithDatastore(ds datastore.Batching) Option
- func WithIndexesClient(client redis.Client) Option
- func WithLegacyClaims(legacyClaims providerindex.LegacyClaimsFinder) Option
- func WithProvidersClient(client redis.Client) Option
- func WithPublisherStore(publisherStore store.PublisherStore) Option
- func WithServiceOptions(opts ...service.Option) Option
- func WithStartIPNIServer(startIPNIServer bool) Option
- type Service
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*config) error
Option configures how the node is construct
func SkipNotification ¶
func SkipNotification() Option
SkipNotification removes setting up IPNI notification handlers
func WithCachingQueue ¶
func WithCachingQueue(cachingQueue blobindexlookup.CachingQueue) Option
WithCachingQueue overrides the default caching queue for provider caching
func WithClaimsClient ¶
WithClaimsClient configures the redis client used for caching content claims.
func WithClaimsStore ¶
func WithClaimsStore(store types.ContentClaimsStore) Option
WithClaimsStore configures the store used for content claims.
func WithDataPath ¶
WithDataPath constructs a flat FS datastore at the specified path to use for IPNI advertisements and content claims.
func WithDatastore ¶
func WithDatastore(ds datastore.Batching) Option
WithDatastore uses the given datastore for storing IPNI advertisements and content claims.
func WithIndexesClient ¶
WithIndexesClient configures the redis client used for caching blob indexes.
func WithLegacyClaims ¶
func WithLegacyClaims(legacyClaims providerindex.LegacyClaimsFinder) Option
WithLegacyClaims uses the given LegacyClaimsFinder to find claims on legacy systems and storage
func WithProvidersClient ¶
WithProvidersClient configures the redis client used for caching providers.
func WithPublisherStore ¶
func WithPublisherStore(publisherStore store.PublisherStore) Option
WithPublisherStore overrides the store used for IPNI advertisements If not used with startIPNIServer = false, store.AdvertStore must implement store.FullStore
func WithServiceOptions ¶
WithServiceOptions passes option to the core service
func WithStartIPNIServer ¶
WithStartIPNIServer determines when IPNI ads will be served directly over HTTP Defaults true
type Service ¶
type Service interface { types.Service Startup(ctx context.Context) error Shutdown(ctx context.Context) error }
Service is the core methods of the indexing service but with additional lifecycle methods.
type ServiceConfig ¶
type ServiceConfig struct { // PrivateKey configures the private key for the service. PrivateKey crypto.PrivKey // PublicURL is the public HTTP URL(s) the indexing service is available at. // These are used when publishing claims, to indicate that they can be // retrieved from here, replacing the pattern "{claim}" with the CID of the // claim that is available. PublicURL []string ProvidersRedis goredis.Options ClaimsRedis goredis.Options IndexesRedis goredis.Options // IndexerURL is the URL of an IPNI node to use for find queries. IndexerURL string // PublisherDirectAnnounceURLs are the URL(s) of IPNI nodes that advertisement // announcements should be sent to. Defaults to IndexerURL if not set. PublisherDirectAnnounceURLs []string // PublisherListenAddr configures the HTTP address the publisher binds to. // This allows a remote IPNI subscriber to fetch advertisements. PublisherListenAddr string // PublisherAnnounceAddrs configures the multiaddrs that are put into announce // messages to tell indexers the addresses to fetch advertisements from. PublisherAnnounceAddrs []string }
ServiceConfig sets specific config values for the service