exchange

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const FxExchangeProtocolID = "/fx.land/exchange/0.0.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Exchange

type Exchange interface {
	Start(context.Context) error
	Push(context.Context, peer.ID, ipld.Link) error
	Pull(context.Context, peer.ID, ipld.Link) error
	Shutdown(context.Context) error
}

type FxExchange added in v0.5.4

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

func NewFxExchange added in v0.5.4

func NewFxExchange(h host.Host, ls ipld.LinkSystem) *FxExchange

func (*FxExchange) Pull added in v0.5.4

func (e *FxExchange) Pull(ctx context.Context, from peer.ID, l ipld.Link) error

func (*FxExchange) Push added in v0.5.4

func (e *FxExchange) Push(ctx context.Context, to peer.ID, l ipld.Link) error

func (*FxExchange) Shutdown added in v0.5.4

func (e *FxExchange) Shutdown(ctx context.Context) error

func (*FxExchange) Start added in v0.5.4

func (e *FxExchange) Start(ctx context.Context) error

type NoopExchange added in v0.5.4

type NoopExchange struct{}

func (NoopExchange) Pull added in v0.5.4

func (n NoopExchange) Pull(ctx context.Context, from peer.ID, l ipld.Link) error

func (NoopExchange) Push added in v0.5.4

func (n NoopExchange) Push(ctx context.Context, to peer.ID, l ipld.Link) error

func (NoopExchange) Shutdown added in v0.5.4

func (n NoopExchange) Shutdown(ctx context.Context) error

func (NoopExchange) Start added in v0.5.4

func (n NoopExchange) Start(context.Context) error

Jump to

Keyboard shortcuts

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