Documentation
¶
Index ¶
- func CacheClaim(ctx context.Context, id principal.Signer, indexingService client.Connection, ...) error
- func PublishLocationCommitment(ctx context.Context, asyncPublisher ipnipub.AsyncPublisher, ...) error
- type Option
- func WithAnnounceAddress(addr multiaddr.Multiaddr) Option
- func WithAsyncPublisher(p ipnipub.AsyncPublisher) Option
- func WithBlobAddress(addr multiaddr.Multiaddr) Option
- func WithDirectAnnounce(announceURLs ...url.URL) Option
- func WithIndexingService(conn client.Connection) Option
- func WithIndexingServiceConfig(serviceDID ucan.Principal, serviceURL url.URL) Option
- func WithIndexingServiceProof(proof ...delegation.Proof) Option
- func WithLogLevel(level string) Option
- type Publisher
- type PublisherService
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheClaim ¶
func CacheClaim( ctx context.Context, id principal.Signer, indexingService client.Connection, invocationProofs delegation.Proofs, clm delegation.Delegation, providerAddresses []multiaddr.Multiaddr, ) error
func PublishLocationCommitment ¶
func PublishLocationCommitment( ctx context.Context, asyncPublisher ipnipub.AsyncPublisher, provider peer.AddrInfo, locationCommitment delegation.Delegation, ) error
Types ¶
type Option ¶
type Option func(*options) error
func WithAnnounceAddress ¶
WithAnnounceAddress sets the address put into announce messages to tell indexers where to fetch advertisements from.
func WithAsyncPublisher ¶ added in v0.0.17
func WithAsyncPublisher(p ipnipub.AsyncPublisher) Option
WithAsyncPublisher configures the async publisher for IPNI advertisements (overrides any publisher specific config)
func WithBlobAddress ¶
WithBlobAddress sets a custom address to tell indexers where to fetch blobs from
func WithDirectAnnounce ¶
WithDirectAnnounce sets indexer URLs to send direct HTTP announcements to.
func WithIndexingService ¶
func WithIndexingService(conn client.Connection) Option
WithIndexingService sets the client connection to the indexing UCAN service.
func WithIndexingServiceConfig ¶
WithIndexingServiceConfig configures UCAN service invocation details for communicating with the indexing service.
func WithIndexingServiceProof ¶
func WithIndexingServiceProof(proof ...delegation.Proof) Option
WithIndexingServiceProof configures proofs for UCAN invocations to the indexing service.
func WithLogLevel ¶
WithLogLevel changes the log level for the publisher subsystem.
type Publisher ¶
type Publisher interface {
// Store is the storage interface for published advertisements.
Store() store.PublisherStore
// Publish advertises content claims/commitments found on this node to the
// storacha network.
Publish(context.Context, delegation.Delegation) error
}
type PublisherService ¶
type PublisherService struct {
// contains filtered or unexported fields
}
func New ¶
func New( id principal.Signer, publisherStore store.PublisherStore, publicAddr multiaddr.Multiaddr, opts ...Option, ) (*PublisherService, error)
New creates a Publisher that publishes content claims/commitments to IPNI and caches them with the indexing service.
The publicAddr parameter is the base public address where adverts and claims can be read from. When publishing, the address is suffixed with a /http-path/<path> multiaddr, where "path" is the URI encoded version of the configured claim path.
Note: publicAddr address must be HTTP(S).
func (*PublisherService) Publish ¶
func (pub *PublisherService) Publish(ctx context.Context, claim delegation.Delegation) error
func (*PublisherService) Store ¶
func (pub *PublisherService) Store() store.PublisherStore