xcli

package module
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: MIT Imports: 28 Imported by: 1

README

xcli

Documentation

Index

Constants

View Source
const TestProtocol = "/test/0.0.1"

Variables

View Source
var (
	ErrBadArgument = fmt.Errorf("bad argument")
	ErrQuitCLI     = fmt.Errorf("quitting cli")
)
View Source
var (
	IPFS_PEERS = ConvertPeers([]string{

		"/ip4/47.100.12.133/tcp/4001/p2p/QmQ4Z47LeGLJ8SanLPaBF3rWWfqKqmanAkCs9CgeYF2TAp",
	})
)

Functions

func ConvertPeers added in v1.2.0

func ConvertPeers(peers []string) []peer.AddrInfo

func DumpDhtDS

func DumpDhtDS(n *P2PNode)

func FindPeer

func FindPeer(c *cli.Context, n *P2PNode, peerid string)

func FindProviders

func FindProviders(n *P2PNode, key string)

func GetKeyValue

func GetKeyValue(c *cli.Context, n *P2PNode, key string)

func PingHost

func PingHost(ctx context.Context, node *P2PNode, peerid string)

func ProvideCid

func ProvideCid(n *P2PNode, key string)

func PutKeyValue

func PutKeyValue(n *P2PNode, key, value string)

func QueryPeer

func QueryPeer(c *cli.Context, n *P2PNode, key string)

func RunCli added in v1.0.3

func RunCli(cmds cli.Commands, f func(map[string]interface{}))

func RunP2PNodeCLI added in v1.0.3

func RunP2PNodeCLI(node *P2PNode, args ...cli.Commands)

func ServeTest

func ServeTest(ctx context.Context, node *P2PNode, limit int64)

func ServeTest2

func ServeTest2(ctx context.Context, limit int64)

Types

type P2PNode

type P2PNode struct {
	host.Host
	Dht *dht.IpfsDHT
	Ds  ds.Datastore
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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