httpsync

package
v0.0.0-...-6862cae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2023 License: Apache-2.0, MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPublisher

func NewPublisher(address string, lsys ipld.LinkSystem, peerID peer.ID, privKey ic.PrivKey) (*publisher, error)

NewPublisher creates a new http publisher, listening on the specified address.

func SignedHeadSchema

func SignedHeadSchema() schema.Type

Types

type Sync

type Sync struct {
	// contains filtered or unexported fields
}

Sync provides sync functionality for use with all http syncs.

func NewSync

func NewSync(lsys ipld.LinkSystem, client *http.Client, blockHook func(peer.ID, cid.Cid)) *Sync

func (*Sync) Close

func (s *Sync) Close()

func (*Sync) NewSyncer

func (s *Sync) NewSyncer(peerID peer.ID, peerAddr multiaddr.Multiaddr, rateLimiter *rate.Limiter) (*Syncer, error)

NewSyncer creates a new Syncer to use for a single sync operation against a peer.

type Syncer

type Syncer struct {
	// contains filtered or unexported fields
}

func (*Syncer) GetHead

func (s *Syncer) GetHead(ctx context.Context) (cid.Cid, error)

func (*Syncer) Sync

func (s *Syncer) Sync(ctx context.Context, nextCid cid.Cid, sel ipld.Node) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL