exchange

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 31 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
	SetAuth(context.Context, peer.ID, peer.ID, bool) 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, o ...Option) (*FxExchange, error)

func (*FxExchange) GetAuth added in v1.0.0

func (e *FxExchange) GetAuth(ctx context.Context) (peer.ID, error)

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) SetAuth added in v0.8.3

func (e *FxExchange) SetAuth(ctx context.Context, on peer.ID, subject peer.ID, allow bool) 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(_ context.Context, from peer.ID, l ipld.Link) error

func (NoopExchange) Push added in v0.5.4

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

func (NoopExchange) SetAuth added in v0.8.3

func (n NoopExchange) SetAuth(_ context.Context, on peer.ID, subject peer.ID, allow bool) error

func (NoopExchange) Shutdown added in v0.5.4

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

func (NoopExchange) Start added in v0.5.4

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

type Option added in v0.8.3

type Option func(*options) error

func WithAllowTransientConnection added in v0.8.4

func WithAllowTransientConnection(t bool) Option

func WithAuthorizer added in v0.8.3

func WithAuthorizer(a peer.ID) Option

WithAuthorizer sets the peer ID that has permission to configure DAG exchange authorization. Defaults to authorization disabled.

func WithIpniProviderEngineOptions added in v1.0.0

func WithIpniProviderEngineOptions(e ...engine.Option) Option

func WithIpniPublishChanBuffer added in v1.0.0

func WithIpniPublishChanBuffer(s int) Option

func WithIpniPublishDisabled added in v1.0.0

func WithIpniPublishDisabled(d bool) Option

func WithIpniPublishInterval added in v1.0.0

func WithIpniPublishInterval(t time.Duration) Option

func WithIpniPublishMaxBatchSize added in v1.0.0

func WithIpniPublishMaxBatchSize(s int) Option

Jump to

Keyboard shortcuts

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