generic

package
v0.0.0-...-804f1da Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NodesFileFlag = cli.StringFlag{
		Name:  "file",
		Usage: "File containing testnet definition",
		Value: "testnet.yaml",
	}
	WorkDir = cli.StringFlag{
		Name:  "workDir",
		Usage: "Folder where files generated during the testnet will be placed",
		Value: "",
	}
	Host = cli.StringFlag{
		Name:  "host",
		Usage: "Genesis host to deploy to",
		Value: "http://localhost:8000",
	}
)
View Source
var (
	DeployCommand = cli.Command{
		Name:        "deploy",
		Usage:       "Command to start a testnet",
		Description: `Command to start a testnet`,
		Action:      deployTestnet,
		Flags: []cli.Flag{
			NodesFileFlag,
			WorkDir,
			Host,
		},
	}
)

Functions

This section is empty.

Types

type FileConfig

type FileConfig struct {
	Source string `yaml:"source"`
	Target string `yaml:"target"`
}

type FileParameter

type FileParameter struct {
	Source string `json:"source"`
	Target string `json:"target"`
}

type NodeConfig

type NodeConfig struct {
	Image        string            `yaml:"image"`
	LaunchScript string            `yaml:"launch-script"`
	Files        []FileConfig      `yaml:"files"`
	Args         map[string]string `yaml:"args"`
}

type Service

type Service struct {
	Name    string            `yaml:"name"`
	Image   string            `yaml:"image"`
	Files   []FileConfig      `yaml:"files"`
	Ports   []string          `yaml:"ports"`
	Env     map[string]string `yaml:"env"`
	Network string            `yaml:"network"`
}

type ServiceParameter

type ServiceParameter struct {
	Name    string            `json:"name"`
	Image   string            `json:"image"`
	Ports   []string          `json:"ports"`
	Volumes []string          `json:"volumes"`
	Env     map[string]string `json:"env"`
	Network string            `json:"network"`
}

type Testnet

type Testnet struct {
	Servers    []int              `json:"servers"`
	Blockchain string             `json:"blockchain"`
	Nodes      int                `json:"nodes"`
	Images     []string           `json:"images"`
	Resources  []TestnetResource  `json:"resources"`
	Params     TestnetParameters  `json:"params"`
	Services   []ServiceParameter `json:"services"`
}

type TestnetConfig

type TestnetConfig struct {
	Nodes    []NodeConfig       `yaml:"nodes"`
	Services map[string]Service `yaml:"services"`
}

type TestnetParameters

type TestnetParameters struct {
	Args            []map[string]string `json:"args"`
	Files           [][]FileParameter   `json:"files"`
	LaunchScripts   []string            `json:"launch-script"`
	NetworkTopology string              `json:"network-topology"`
}

type TestnetResource

type TestnetResource struct {
	Cpus    string   `json:"cpus"`
	Memory  string   `json:"memory"`
	Volumes []string `json:"volumes"`
	Ports   []string `json:"ports"`
}

Jump to

Keyboard shortcuts

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