Documentation ¶
Index ¶
- func EncodeMessage(m Message) []byte
- func NewPublisher(host host.Host, ds datastore.Batching, lsys ipld.LinkSystem, topic string, ...) (*publisher, error)
- func NewPublisherFromExisting(dtManager dt.Manager, host host.Host, topic string, lsys ipld.LinkSystem, ...) (*publisher, error)
- type Message
- type Option
- type Sync
- type Syncer
- type Voucher
- type VoucherResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeMessage ¶
Types ¶
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
Sync provides sync functionality for use with all datatransfer syncs.
func NewSync ¶
func NewSync(host host.Host, ds datastore.Batching, lsys ipld.LinkSystem, blockHook func(peer.ID, cid.Cid)) (*Sync, error)
NewSync creates a new Sync with its own datatransfer.Manager.
func NewSyncWithDT ¶ added in v0.2.1
NewSyncWithDT creates a new Sync with a datatransfer.Manager provided by the caller.
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer handles a single sync with a provider.
type Voucher ¶
type Voucher struct {
Head *cid.Cid
}
A Voucher is used to communicate a new DAG head
func (*Voucher) Type ¶
func (v *Voucher) Type() datatransfer.TypeIdentifier
Type provides an identifier for the voucher to go-data-transfer
type VoucherResult ¶
type VoucherResult struct {
Code uint64
}
A VoucherResult responds to a voucher
func (*VoucherResult) MarshalCBOR ¶
func (t *VoucherResult) MarshalCBOR(w io.Writer) error
func (*VoucherResult) Type ¶
func (v *VoucherResult) Type() datatransfer.TypeIdentifier
Type provides an identifier for the voucher result to go-data-transfer
func (*VoucherResult) UnmarshalCBOR ¶
func (t *VoucherResult) UnmarshalCBOR(r io.Reader) error
Click to show internal directories.
Click to hide internal directories.