Documentation ¶
Index ¶
- type Cluster
- func (cluster *Cluster) ActiveApiHosts() []string
- func (cluster *Cluster) ActivePublisherHosts() []string
- func (cluster *Cluster) AllWaspNodes() []int
- func (cluster *Cluster) ApiHosts() []string
- func (cluster *Cluster) CollectMessages(duration time.Duration)
- func (cluster *Cluster) ConfigKeysPath() string
- func (cluster *Cluster) GenerateDKSetsToFile() error
- func (cluster *Cluster) GoshimmerConfigTemplatePath() string
- func (cluster *Cluster) GoshimmerDataPath() string
- func (cluster *Cluster) Init(resetDataPath bool, name string) error
- func (cluster *Cluster) IsGoshimmerUp() bool
- func (cluster *Cluster) JoinConfigPath(s string) string
- func (cluster *Cluster) ListenToMessages(expectations map[string]int) error
- func (cluster *Cluster) NumSmartContracts() int
- func (cluster *Cluster) PeeringHosts() []string
- func (cluster *Cluster) PostTransaction(tx *sctransaction.Transaction) error
- func (cluster *Cluster) PublisherHosts() []string
- func (cluster *Cluster) Report() bool
- func (cluster *Cluster) Start() error
- func (cluster *Cluster) Stop()
- func (cluster *Cluster) StopNode(nodeIndex int)
- func (cluster *Cluster) VerifyAddressBalances(addr address.Address, totalExpected int64, expect map[balance.Color]int64, ...) bool
- func (cluster *Cluster) VerifySCState(sc *SmartContractFinalConfig, expectedIndex uint32, ...) bool
- func (cluster *Cluster) VerifySCStateVariables(sc *SmartContractFinalConfig, expectedValues map[kv.Key][]byte) bool
- func (cluster *Cluster) VerifySCStateVariables2(addr *address.Address, expectedValues map[kv.Key]interface{}) bool
- func (cluster *Cluster) Wait()
- func (cluster *Cluster) WaitUntilExpectationsMet() bool
- func (cluster *Cluster) WaspConfigTemplatePath() string
- func (cluster *Cluster) WaspHosts(nodeIndexes []int, getHost func(w *WaspNodeConfig) string) []string
- func (cluster *Cluster) WaspNodeDataPath(i int) string
- func (cluster *Cluster) WithSCState(sc *SmartContractFinalConfig, ...) bool
- type ClusterConfig
- type SmartContractFinalConfig
- func (sc *SmartContractFinalConfig) AllNodes() []int
- func (scdata *SmartContractFinalConfig) CreateOrigin(client nodeclient.NodeClient) (*sctransaction.Transaction, error)
- func (scdata *SmartContractFinalConfig) GetColor() balance.Color
- func (scdata *SmartContractFinalConfig) GetProgramHash() *hashing.HashValue
- func (sc *SmartContractFinalConfig) OwnerAddress() address.Address
- func (sc *SmartContractFinalConfig) OwnerSigScheme() signaturescheme.SignatureScheme
- func (sc *SmartContractFinalConfig) SCAddress() address.Address
- type SmartContractInitData
- type WaspNodeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { Config *ClusterConfig SmartContractConfig []SmartContractFinalConfig ConfigPath string // where the cluster configuration is stored - read only DataPath string // where the cluster's volatile data lives Started bool NodeClient nodeclient.NodeClient // contains filtered or unexported fields }
func (*Cluster) ActiveApiHosts ¶
func (*Cluster) ActivePublisherHosts ¶
func (*Cluster) AllWaspNodes ¶
func (*Cluster) CollectMessages ¶
func (*Cluster) ConfigKeysPath ¶
func (*Cluster) GenerateDKSetsToFile ¶
func (*Cluster) GoshimmerConfigTemplatePath ¶
func (*Cluster) GoshimmerDataPath ¶
func (*Cluster) IsGoshimmerUp ¶
func (*Cluster) JoinConfigPath ¶
func (*Cluster) ListenToMessages ¶
func (*Cluster) NumSmartContracts ¶
func (*Cluster) PeeringHosts ¶
func (*Cluster) PostTransaction ¶
func (cluster *Cluster) PostTransaction(tx *sctransaction.Transaction) error
func (*Cluster) PublisherHosts ¶
func (*Cluster) Start ¶
Start launches all wasp nodes in the cluster, each running in its own directory
func (*Cluster) Stop ¶
func (cluster *Cluster) Stop()
Stop sends an interrupt signal to all nodes and waits for them to exit
func (*Cluster) VerifyAddressBalances ¶
func (*Cluster) VerifySCState ¶
func (*Cluster) VerifySCStateVariables ¶
func (*Cluster) VerifySCStateVariables2 ¶
func (*Cluster) WaitUntilExpectationsMet ¶
func (*Cluster) WaspConfigTemplatePath ¶
func (*Cluster) WaspHosts ¶
func (cluster *Cluster) WaspHosts(nodeIndexes []int, getHost func(w *WaspNodeConfig) string) []string
func (*Cluster) WaspNodeDataPath ¶
func (*Cluster) WithSCState ¶
type ClusterConfig ¶
type ClusterConfig struct { Nodes []*WaspNodeConfig `json:"nodes"` Goshimmer *struct { ApiPort int `json:"api_port"` Provided bool `json:"provided"` // contains filtered or unexported fields } `json:"goshimmer"` SmartContracts []SmartContractInitData `json:"smart_contracts"` }
type SmartContractFinalConfig ¶
type SmartContractFinalConfig struct { Address string `json:"address"` Description string `json:"description"` ProgramHash string `json:"program_hash"` CommitteeNodes []int `json:"committee_nodes"` AccessNodes []int `json:"access_nodes,omitempty"` OwnerSeed []byte `json:"owner_seed"` // contains filtered or unexported fields }
func (*SmartContractFinalConfig) AllNodes ¶
func (sc *SmartContractFinalConfig) AllNodes() []int
func (*SmartContractFinalConfig) CreateOrigin ¶
func (scdata *SmartContractFinalConfig) CreateOrigin(client nodeclient.NodeClient) (*sctransaction.Transaction, error)
func (*SmartContractFinalConfig) GetColor ¶
func (scdata *SmartContractFinalConfig) GetColor() balance.Color
func (*SmartContractFinalConfig) GetProgramHash ¶
func (scdata *SmartContractFinalConfig) GetProgramHash() *hashing.HashValue
func (*SmartContractFinalConfig) OwnerAddress ¶
func (sc *SmartContractFinalConfig) OwnerAddress() address.Address
func (*SmartContractFinalConfig) OwnerSigScheme ¶
func (sc *SmartContractFinalConfig) OwnerSigScheme() signaturescheme.SignatureScheme
func (*SmartContractFinalConfig) SCAddress ¶
func (sc *SmartContractFinalConfig) SCAddress() address.Address
type SmartContractInitData ¶
type WaspNodeConfig ¶
type WaspNodeConfig struct { ApiPort int `json:"api_port"` PeeringPort int `json:"peering_port"` NanomsgPort int `json:"nanomsg_port"` DashboardPort int `json:"dashboard_port"` // contains filtered or unexported fields }
func (*WaspNodeConfig) ApiHost ¶
func (w *WaspNodeConfig) ApiHost() string
func (*WaspNodeConfig) IsUp ¶
func (w *WaspNodeConfig) IsUp() bool
func (*WaspNodeConfig) NanomsgHost ¶
func (w *WaspNodeConfig) NanomsgHost() string
func (*WaspNodeConfig) PeeringHost ¶
func (w *WaspNodeConfig) PeeringHost() string
Click to show internal directories.
Click to hide internal directories.