Documentation
¶
Index ¶
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, publisher ipnipub.Publisher, provider peer.AddrInfo, locationCommitment delegation.Delegation, ) error
Types ¶
type Option ¶
type Option func(*options) error
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