Documentation ¶
Index ¶
- func AddPPoVFlags(cmd *exec.Cmd, config *node.Config)
- func GetUnselectedIndexes(total int, selected []int) []int
- func MakePeers(keys []*core.PrivateKey, addrs []multiaddr.Multiaddr) []node.Peer
- func MakeRandomKeys(count int) []*core.PrivateKey
- func PickUniqueRandoms(total, count int, isSort bool) []int
- func RunCommand(cmd *exec.Cmd) error
- func SetupTemplateDir(dir string, keys []*core.PrivateKey, vlds []node.Peer, ...) error
- func Sleep(d time.Duration)
- func WriteGenesisFile(datadir string, genesis *node.Genesis) error
- func WriteNodeKey(datadir string, key *core.PrivateKey) error
- func WritePeersFile(datadir string, peers []node.Peer) error
- func WriteYamlFile(clusterDir string, data DockerCompose) error
- type Cluster
- type ClusterFactory
- type DockerCompose
- type LocalFactory
- type LocalFactoryParams
- type LocalNode
- func (node *LocalNode) EffectDelay(d time.Duration) error
- func (node *LocalNode) EffectLoss(percent float32) error
- func (node *LocalNode) GetEndpoint() string
- func (node *LocalNode) IsRunning() bool
- func (node *LocalNode) NodeConfig() node.Config
- func (node *LocalNode) PrintCmd() string
- func (node *LocalNode) RemoveEffect()
- func (node *LocalNode) Start() error
- func (node *LocalNode) Stop()
- type Node
- type RemoteFactory
- func (ftry *RemoteFactory) GetHosts() []string
- func (ftry *RemoteFactory) GetParams() RemoteFactoryParams
- func (ftry *RemoteFactory) ReadHosts(hostsPath string, nodeCount int) error
- func (ftry *RemoteFactory) SetupCluster(name string) (*Cluster, error)
- func (ftry *RemoteFactory) TemplateDir() string
- type RemoteFactoryParams
- type RemoteNode
- func (node *RemoteNode) DownloadFile(localPath string, fileName string)
- func (node *RemoteNode) EffectDelay(d time.Duration) error
- func (node *RemoteNode) EffectLoss(percent float32) error
- func (node *RemoteNode) GetEndpoint() string
- func (node *RemoteNode) InstallDstat()
- func (node *RemoteNode) IsRunning() bool
- func (node *RemoteNode) NodeConfig() node.Config
- func (node *RemoteNode) PrintCmd() string
- func (node *RemoteNode) RemoveDB()
- func (node *RemoteNode) RemoveEffect()
- func (node *RemoteNode) Start() error
- func (node *RemoteNode) StartDstat()
- func (node *RemoteNode) Stop()
- func (node *RemoteNode) StopDstat()
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUnselectedIndexes ¶
func MakeRandomKeys ¶
func MakeRandomKeys(count int) []*core.PrivateKey
func PickUniqueRandoms ¶
func RunCommand ¶
func SetupTemplateDir ¶
func WriteNodeKey ¶
func WriteNodeKey(datadir string, key *core.PrivateKey) error
func WriteYamlFile ¶
func WriteYamlFile(clusterDir string, data DockerCompose) error
Types ¶
type Cluster ¶
type Cluster struct { CheckRotation bool EmptyChainCode bool // contains filtered or unexported fields }
func (*Cluster) NodeConfig ¶
func (*Cluster) RemoveEffects ¶
func (cls *Cluster) RemoveEffects()
type ClusterFactory ¶
type DockerCompose ¶
type DockerCompose struct { Version string `yaml:"version"` Services map[string]Service `yaml:"services"` }
func NewDockerCompose ¶
func NewDockerCompose(cls *Cluster) DockerCompose
type LocalFactory ¶
type LocalFactory struct {
// contains filtered or unexported fields
}
func NewLocalFactory ¶
func NewLocalFactory(params LocalFactoryParams) (*LocalFactory, error)
func (*LocalFactory) SetupCluster ¶
func (ftry *LocalFactory) SetupCluster(name string) (*Cluster, error)
func (*LocalFactory) TemplateDir ¶
func (ftry *LocalFactory) TemplateDir() string
type LocalFactoryParams ¶
type LocalNode ¶
type LocalNode struct {
// contains filtered or unexported fields
}
func (*LocalNode) EffectLoss ¶
func (*LocalNode) GetEndpoint ¶
func (*LocalNode) NodeConfig ¶
func (*LocalNode) RemoveEffect ¶
func (node *LocalNode) RemoveEffect()
type RemoteFactory ¶
type RemoteFactory struct {
// contains filtered or unexported fields
}
func NewRemoteFactory ¶
func NewRemoteFactory(params RemoteFactoryParams) (*RemoteFactory, error)
func (*RemoteFactory) GetHosts ¶
func (ftry *RemoteFactory) GetHosts() []string
func (*RemoteFactory) GetParams ¶
func (ftry *RemoteFactory) GetParams() RemoteFactoryParams
func (*RemoteFactory) ReadHosts ¶
func (ftry *RemoteFactory) ReadHosts(hostsPath string, nodeCount int) error
func (*RemoteFactory) SetupCluster ¶
func (ftry *RemoteFactory) SetupCluster(name string) (*Cluster, error)
func (*RemoteFactory) TemplateDir ¶
func (ftry *RemoteFactory) TemplateDir() string
type RemoteFactoryParams ¶
type RemoteNode ¶
type RemoteNode struct {
// contains filtered or unexported fields
}
func (*RemoteNode) DownloadFile ¶
func (node *RemoteNode) DownloadFile(localPath string, fileName string)
func (*RemoteNode) EffectDelay ¶
func (node *RemoteNode) EffectDelay(d time.Duration) error
func (*RemoteNode) EffectLoss ¶
func (node *RemoteNode) EffectLoss(percent float32) error
func (*RemoteNode) GetEndpoint ¶
func (node *RemoteNode) GetEndpoint() string
func (*RemoteNode) InstallDstat ¶
func (node *RemoteNode) InstallDstat()
func (*RemoteNode) IsRunning ¶
func (node *RemoteNode) IsRunning() bool
func (*RemoteNode) NodeConfig ¶
func (node *RemoteNode) NodeConfig() node.Config
func (*RemoteNode) PrintCmd ¶
func (node *RemoteNode) PrintCmd() string
func (*RemoteNode) RemoveDB ¶
func (node *RemoteNode) RemoveDB()
func (*RemoteNode) RemoveEffect ¶
func (node *RemoteNode) RemoveEffect()
func (*RemoteNode) Start ¶
func (node *RemoteNode) Start() error
func (*RemoteNode) StartDstat ¶
func (node *RemoteNode) StartDstat()
func (*RemoteNode) Stop ¶
func (node *RemoteNode) Stop()
func (*RemoteNode) StopDstat ¶
func (node *RemoteNode) StopDstat()
Click to show internal directories.
Click to hide internal directories.