fulamobile

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.4.9

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

func NewClient added in v0.4.9

func NewClient(cfg *Config) (*Client, error)

func (*Client) Get added in v0.4.9

func (c *Client) Get(key []byte) ([]byte, error)

Get gets the value corresponding to the given key from the local datastore. The key must be a valid ipld.Link.

func (*Client) Has added in v0.4.9

func (c *Client) Has(key []byte) (bool, error)

Has checks whether the value corresponding to the given key is present in the local datastore. The key must be a valid ipld.Link.

func (*Client) Pull added in v0.4.9

func (c *Client) Pull(addr string, key []byte) error

Pull downloads the data corresponding to the given key from the given addr. The key must be a valid ipld.Link, and the addr must be a valid multiaddr that includes peer ID. See peer.AddrInfoFromString.

func (*Client) Push added in v0.4.9

func (c *Client) Push(addr string, key []byte) error

Push requests the given addr to download the given key from this node. The key must be a valid ipld.Link, and the addr must be a valid multiaddr that includes peer ID. The value corresponding to the given key must be stored in the local datastore prior to calling this function. See: Client.Put, peer.AddrInfoFromString.

func (*Client) Put added in v0.4.9

func (c *Client) Put(key, value []byte) error

Put stores the given key value onto the local datastore. The key must be a valid ipld.Link and the value must be the valid encoded ipld.Node corresponding to the given key.

func (*Client) Shutdown added in v0.4.9

func (c *Client) Shutdown() error

Shutdown closes all resources used by Client. After calling this function Client must be discarded.

type Config added in v0.4.9

type Config struct {
	Identity  []byte
	StorePath string
}

Jump to

Keyboard shortcuts

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