p2p

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIPNS

func AddIPNS(cid *cid.Cid, name string) (*ipns_pb.IpnsEntry, error)

Types

type Client

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

waitlist 발신 ( 수신 / 송신 )

func NewClient

func NewClient(ctx context.Context, cfg *ClientConfig) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Connect

func (c *Client) Connect(ctx context.Context, targetPeer string) error

func (*Client) Download

func (c *Client) Download(ctx context.Context, cid cid.Cid, path string) error

func (*Client) Self

func (c *Client) Self() string

func (*Client) Upload

func (c *Client) Upload(ctx context.Context, cid cid.Cid, path string) error

type ClientConfig

type ClientConfig struct {
	RootPath   string
	Peers      []string
	SizeWorker int
	ExpireSec  int
}

Jump to

Keyboard shortcuts

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