Documentation ¶
Index ¶
- func SignedHeadSchema() schema.Type
- type Publisher
- func NewPublisher(address string, lsys ipld.LinkSystem, privKey ic.PrivKey) (*Publisher, error)
- func NewPublisherForListener(listener net.Listener, handlerPath string, lsys ipld.LinkSystem, ...) (*Publisher, error)
- func NewPublisherWithoutServer(address string, handlerPath string, lsys ipld.LinkSystem, privKey ic.PrivKey) (*Publisher, error)
- type Sync
- type Syncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SignedHeadSchema ¶
Types ¶
type Publisher ¶ added in v0.0.5
type Publisher struct {
// contains filtered or unexported fields
}
Publisher serves an advertisement chain over HTTP.
func NewPublisher ¶
NewPublisher creates a new http publisher, listening on the specified address.
func NewPublisherForListener ¶ added in v0.1.0
func NewPublisherForListener(listener net.Listener, handlerPath string, lsys ipld.LinkSystem, privKey ic.PrivKey) (*Publisher, error)
NewPublisherForListener creates a new http publisher for an existing listener. When providing an existing listener, running the HTTP server is the caller's responsibility. ServeHTTP on the returned Publisher can be used to handle requests. handlerPath is the path to handle requests on, e.g. "ipni" for `/ipni/...` requests.
DEPRECATED: use NewPublisherWithoutServer(listener.Addr(), ...)
func NewPublisherWithoutServer ¶ added in v0.2.3
func NewPublisherWithoutServer(address string, handlerPath string, lsys ipld.LinkSystem, privKey ic.PrivKey) (*Publisher, error)
NewPublisherWithoutServer creates a new http publisher for an existing network address. When providing an existing network address, running the HTTP server is the caller's responsibility. ServeHTTP on the returned Publisher can be used to handle requests. handlerPath is the path to handle requests on, e.g. "ipni" for `/ipni/...` requests.
func (*Publisher) Addrs ¶ added in v0.0.5
func (p *Publisher) Addrs() []multiaddr.Multiaddr
Addrs returns the addresses, as []multiaddress, that the Publisher is listening on.
func (*Publisher) Protocol ¶ added in v0.0.5
Protocol returns the multihash protocol ID of the transport used by the publisher.
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
Sync provides sync functionality for use with all http syncs.