helpers

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllNewNodeExecCon

func AllNewNodeExecCon(tn *testnet.TestNet, fn func(*ssh.Client, *db.Server, int, int) error) error

func AllNodeExecCon

func AllNodeExecCon(tn *testnet.TestNet, fn func(*ssh.Client, *db.Server, int, int) error) error

func AllServerExecCon

func AllServerExecCon(tn *testnet.TestNet, fn func(*ssh.Client, *db.Server) error) error

func CheckDeployFlag

func CheckDeployFlag(details *db.DeploymentDetails, flag string) bool

func CopyAllToServers

func CopyAllToServers(tn *testnet.TestNet, srcDst ...string) error

func CopyBytesToAllNewNodes

func CopyBytesToAllNewNodes(tn *testnet.TestNet, dataDst ...string) error

func CopyBytesToAllNodes

func CopyBytesToAllNodes(tn *testnet.TestNet, dataDst ...string) error

func CopyBytesToNodeFiles

func CopyBytesToNodeFiles(client *ssh.Client, buildState *state.BuildState, transfers ...FileDest) error

func CopyToAllNewNodes

func CopyToAllNewNodes(tn *testnet.TestNet, srcDst ...string) error

func CopyToAllNodes

func CopyToAllNodes(tn *testnet.TestNet, srcDst ...string) error

func CopyToServers

func CopyToServers(tn *testnet.TestNet, src string, dst string) error

func CreateConfigs

func CreateConfigs(tn *testnet.TestNet, dest string, fn func(int, int, int) ([]byte, error)) error

func CreateConfigsNewNodes

func CreateConfigsNewNodes(tn *testnet.TestNet, dest string, fn func(int, int, int) ([]byte, error)) error

func GetBlockchainConfig

func GetBlockchainConfig(blockchain string, node int, file string, details *db.DeploymentDetails) ([]byte, error)

func GetDefaults

func GetDefaults(details *db.DeploymentDetails, term string) (interface{}, bool)

func GetFileDefault

func GetFileDefault(details *db.DeploymentDetails, file string) (string, bool)

func GetStaticBlockchainConfig

func GetStaticBlockchainConfig(blockchain string, file string) ([]byte, error)

func ScpAndDeferRemoval

func ScpAndDeferRemoval(client *ssh.Client, buildState *state.BuildState, src string, dst string)

func SingleCp

func SingleCp(client *ssh.Client, buildState *state.BuildState, localNodeId int, data []byte, dest string) error

Types

type FileDest

type FileDest struct {
	Data        []byte
	Dest        string
	LocalNodeId int
}

type KeyMaster

type KeyMaster struct {
	PrivateKeys []string
	PublicKeys  []string
	// contains filtered or unexported fields
}

Static resource key manager Uses keys stored in the blockchains resource directory, so that keys can remain consistent among builds and also to save time on builds where a large number of keys are needed.

func NewKeyMaster

func NewKeyMaster(details *db.DeploymentDetails, blockchain string) (*KeyMaster, error)

func (*KeyMaster) AddGenerator

func (this *KeyMaster) AddGenerator(gen func(client *ssh.Client) (util.KeyPair, error))

func (*KeyMaster) GenerateKeyPair

func (this *KeyMaster) GenerateKeyPair(client *ssh.Client) (util.KeyPair, error)

func (*KeyMaster) GetKeyPair

func (this *KeyMaster) GetKeyPair(client *ssh.Client) (util.KeyPair, error)

func (*KeyMaster) GetMappedKeyPairs

func (this *KeyMaster) GetMappedKeyPairs(args []string, client *ssh.Client) (map[string]util.KeyPair, error)

func (*KeyMaster) GetServerKeyPairs

func (this *KeyMaster) GetServerKeyPairs(servers []db.Server, clients []*ssh.Client) (map[string]util.KeyPair, error)

Jump to

Keyboard shortcuts

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