Documentation
¶
Index ¶
- func SignedHeadSchema() schema.Type
- type Option
- type Publisher
- func (p *Publisher) Addrs() []multiaddr.Multiaddr
- func (p *Publisher) AnnounceHead(ctx context.Context) error
- func (p *Publisher) AnnounceHeadWithAddrs(ctx context.Context, addrs []multiaddr.Multiaddr) error
- func (p *Publisher) Close() error
- func (p *Publisher) ID() peer.ID
- func (p *Publisher) Protocol() int
- func (p *Publisher) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (p *Publisher) SetRoot(_ context.Context, c cid.Cid) error
- func (p *Publisher) UpdateRoot(ctx context.Context, c cid.Cid) error
- func (p *Publisher) UpdateRootWithAddrs(ctx context.Context, c cid.Cid, addrs []multiaddr.Multiaddr) error
- type Sync
- type Syncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignedHeadSchema ¶
Types ¶
type Option ¶
type Option func(*config) error
Option is a function that sets a value in a config.
func WithAnnounceSenders ¶
WithAnnounceSenders sets announce.Senders to use for sending announcements.
func WithExtraData ¶
WithExtraData sets the extra data to include in the pubsub message.
type Publisher ¶ added in v0.0.5
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func NewPublisher(address string, lsys ipld.LinkSystem, privKey ic.PrivKey, options ...Option) (*Publisher, error)
NewPublisher creates a new http publisher, listening on the specified address.
func (*Publisher) Addrs ¶ added in v0.0.5
Addrs returns the addresses, as []multiaddress, that the Publisher is listening on.
func (*Publisher) AnnounceHead ¶ added in v0.0.5
func (*Publisher) AnnounceHeadWithAddrs ¶ added in v0.0.5
func (*Publisher) ServeHTTP ¶ added in v0.0.5
func (p *Publisher) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*Publisher) UpdateRoot ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.