types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeModeValidator           = "validator"
	NodeModeFull                = "full"
	NodeWalletChainTypeVega     = "vega"
	NodeWalletChainTypeEthereum = "ethereum"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataNode

type DataNode struct {
	Name       string
	HomeDir    string
	BinaryPath string
}

type Faucet

type Faucet struct {
	Name               string
	HomeDir            string
	PublicKey          string
	ConfigFilePath     string
	WalletFilePath     string
	WalletPassFilePath string
}

type GeneratedServices

type GeneratedServices struct {
	Wallet          *Wallet
	Faucet          *Faucet
	NodeSets        NodeSetMap
	PreGenerateJobs []NomadJob
}

func NewGeneratedServices

func NewGeneratedServices(w *Wallet, f *Faucet, ns []NodeSet) *GeneratedServices

func (GeneratedServices) GetNodeSet

func (gs GeneratedServices) GetNodeSet(name string) (*NodeSet, error)

func (GeneratedServices) GetNodeSetsByGroupName

func (gs GeneratedServices) GetNodeSetsByGroupName(groupName string) []NodeSet

func (GeneratedServices) GetValidators

func (gs GeneratedServices) GetValidators() []NodeSet

func (GeneratedServices) ListValidators

func (gs GeneratedServices) ListValidators() []VegaNodeOutput

func (GeneratedServices) PreGenerateJobsIDs added in v0.2.0

func (gs GeneratedServices) PreGenerateJobsIDs() []string

PreGenerateJobsIDs returns pre gen jobs ids across all node sets

type JobIDMap

type JobIDMap map[string]bool

func (JobIDMap) ToSlice

func (jm JobIDMap) ToSlice() []string

type NetworkJobs

type NetworkJobs struct {
	NodesSetsJobIDs JobIDMap
	ExtraJobIDs     JobIDMap
	FaucetJobID     string
	WalletJobID     string
}

func (NetworkJobs) AddExtraJobIDs

func (nj NetworkJobs) AddExtraJobIDs(ids []string)

func (NetworkJobs) Exists

func (nj NetworkJobs) Exists(jobID string) bool

func (NetworkJobs) ToSlice

func (nj NetworkJobs) ToSlice() []string

type NodeSet

type NodeSet struct {
	GroupName       string
	Name            string
	Mode            string
	Index           int
	Vega            VegaNode
	Tendermint      TendermintNode
	DataNode        *DataNode
	NomadJobRaw     *string `json:",omitempty"`
	PreGenerateJobs []NomadJob
}

func FilterNodeSets

func FilterNodeSets(nodeSets []NodeSet, filters ...NodeSetFilter) []NodeSet

func (NodeSet) PreGenerateJobsIDs added in v0.2.0

func (ns NodeSet) PreGenerateJobsIDs() []string

PreGenerateJobsIDs returns pre gen jobs ids per specific node set

func (NodeSet) PreGenerateRawJobs added in v0.2.0

func (ns NodeSet) PreGenerateRawJobs() []string

PreGenerateRawJobs returns pre gen jobs per specific node set

type NodeSetFilter

type NodeSetFilter func(ns NodeSet) bool

func NodeSetFilterByGroupName

func NodeSetFilterByGroupName(groupName string) NodeSetFilter

func NodeSetFilterByGroupNames

func NodeSetFilterByGroupNames(names []string) NodeSetFilter

func NodeSetFilterByNames

func NodeSetFilterByNames(names []string) NodeSetFilter

type NodeSetMap

type NodeSetMap map[string]NodeSet

func (NodeSetMap) ToSlice

func (nm NodeSetMap) ToSlice() []NodeSet

type NodeWalletInfo

type NodeWalletInfo struct {
	EthereumAddress          string
	EthereumPrivateKey       string
	EthereumClefRPCAddress   string
	VegaWalletPublicKey      string
	VegaWalletRecoveryPhrase string
}

type NomadJob added in v0.2.0

type NomadJob struct {
	ID          string
	NomadJobRaw string
}

type RawJobWithNomadJob added in v0.2.0

type RawJobWithNomadJob struct {
	RawJob   string
	NomadJob *api.Job
}

type SmartContractsInfo

type SmartContractsInfo struct {
	MultisigControl struct {
		EthereumAddress string `json:"Ethereum"`
	} `json:"MultisigControl"`
	EthereumOwner struct {
		Public  string `json:"pub"`
		Private string `json:"priv"`
	} `json:"addr0"`
}

type TendermintNode

type TendermintNode struct {
	Name            string
	NodeID          string
	HomeDir         string
	GenesisFilePath string
	BinaryPath      string
}

type VegaNode

type VegaNode struct {
	Name                   string
	Mode                   string
	HomeDir                string
	NodeWalletPassFilePath string
	NodeWalletInfo         *NodeWalletInfo `json:",omitempty"`
	BinaryPath             string
}

type VegaNodeOutput

type VegaNodeOutput struct {
	NomadJobName string
	VegaNode
}

type Wallet

type Wallet struct {
	Name                  string
	HomeDir               string
	Network               string
	ServiceConfigFilePath string
	PublicKeyFilePath     string
	PrivateKeyFilePath    string
}

Jump to

Keyboard shortcuts

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