operations

package
v0.0.0-...-fa7aae8 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2020 License: AGPL-3.0 Imports: 19 Imported by: 0

README

operations

This folder contains the Crux client interacting with IPFS Cluster.

const.go

Contains the constants used by the Crux client.

operations.go

Contains the basic commands implementation for the Crux client, such as Write(f) or Read(f).

performance.go

Contains a few tests, testing interaction latency between pairs of hosts. The first node of the pair using the Write(f) function and the second one using the Read(f) function. The interaction time of those two calls is measured and outputed.

save.go

Contains a Save(state) and Load(file) methods. The Save(state) method saves the state of running IPFS and IPFS Cluster daemons, with IP and ports. Load(file) reads the saved file and load the running IPFS and IPFS daemon details, in order to interact with them.

struct.go

Contains the structures used by the Crux client.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListPeers

func ListPeers(c client.Client)

ListPeers of a client

func LoadClusterInstances

func LoadClusterInstances(filename string) map[string]*Node

LoadClusterInstances load ipfs-cluster instances for each node

func NewFile

func NewFile(filename string)

NewFile write new file to disk

func Read

func Read(node, filename string) map[string]time.Duration

Read the given filename from the given node

func SaveState

func SaveState(filename string, instances map[string]*service.NodeInfo)

SaveState save ipfs and ipfs-cluster instances state

func Test0

func Test0(nodesN int)

Test0 perf test takes random nodes (non reproductible), output max and min time when performing an operation (write + read)

func Test1

func Test1(nOps, nodesN int)

Test1 try to load an existing sequence, if sequence does not match generate a new one. Performance tests, yield min and max operation time (write + read)

func Test2

func Test2(nOps, nodesN int)

Test2 measure nOps write + read operation between pairs of nodes among a set of nodesN nodes. It first tries to read the operation sequence (to reproduce) the same sequence as a previous experiment, if does not exist or invalid format, generate a new sequence

func Write

func Write(node, filename string) (string, map[string]time.Duration)

Write the given filename from the given node

Types

type Node

type Node struct {
	Name    string
	Clients []client.Client
	Secrets []string
	Addrs   []string
}

Node with its ipfs cluster ac

Jump to

Keyboard shortcuts

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