Documentation ¶
Index ¶
- func ConfigExists(dataPath string) (bool, error)
- type Chain
- func (ch *Chain) ApiHosts() []string
- func (ch *Chain) ChainAddress() *address.Address
- func (ch *Chain) Client(sigScheme signaturescheme.SignatureScheme) *chainclient.Client
- func (ch *Chain) CommitteeMultiClient() *multiclient.MultiClient
- func (ch *Chain) ContractID(contractHname coretypes.Hname) coretypes.ContractID
- func (ch *Chain) DeployContract(name string, progHashStr string, description string, ...) (*sctransaction.Transaction, error)
- func (ch *Chain) DeployWasmContract(name string, description string, progBinary []byte, ...) (*sctransaction.Transaction, hashing.HashValue, error)
- func (ch *Chain) DeployWasmContractOld(name string, description string, progBinary []byte, ...) (*sctransaction.Transaction, hashing.HashValue, error)
- func (ch *Chain) GetBlobFieldValue(blobHash hashing.HashValue, field string) ([]byte, error)
- func (ch *Chain) OriginatorAddress() *address.Address
- func (ch *Chain) OriginatorClient() *chainclient.Client
- func (ch *Chain) OriginatorID() *coretypes.AgentID
- func (ch *Chain) OriginatorSigScheme() signaturescheme.SignatureScheme
- func (ch *Chain) PeeringHosts() []string
- func (ch *Chain) SCClient(contractHname coretypes.Hname, sigScheme signaturescheme.SignatureScheme) *scclient.SCClient
- func (ch *Chain) StartMessageCounter(expectations map[string]int) (*MessageCounter, error)
- func (ch *Chain) WithSCState(hname coretypes.Hname, ...) bool
- type Cluster
- func (cluster *Cluster) ActiveNodes() []int
- func (clu *Cluster) DeployChain(description string, committeeNodes []int, quorum uint16) (*Chain, error)
- func (clu *Cluster) DeployDefaultChain() (*Chain, error)
- func (cluster *Cluster) InitDataPath(templatesPath string, dataPath string, removeExisting bool) error
- func (cluster *Cluster) IsGoshimmerUp() bool
- func (cluster *Cluster) IsNodeUp(i int) bool
- func (clu *Cluster) Level1Client() level1.Level1Client
- func (cluster *Cluster) MultiClient() *multiclient.MultiClient
- func (cluster *Cluster) PostTransaction(tx *sctransaction.Transaction) error
- func (cluster *Cluster) Start(dataPath string) error
- func (cluster *Cluster) StartMessageCounter(expectations map[string]int) (*MessageCounter, 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) VerifySCStateVariables2(addr *address.Address, expectedValues map[kv.Key]interface{}) bool
- func (cluster *Cluster) Wait()
- func (cluster *Cluster) WaspClient(nodeIndex int) *client.WaspClient
- type ClusterConfig
- func (c *ClusterConfig) AllNodes() []int
- func (c *ClusterConfig) ApiHost(nodeIndex int) string
- func (c *ClusterConfig) ApiHosts(nodeIndexes ...[]int) []string
- func (c *ClusterConfig) ApiPort(nodeIndex int) int
- func (c *ClusterConfig) DashboardPort(nodeIndex int) int
- func (c *ClusterConfig) GoshimmerConfigTemplateParams() *templates.GoshimmerConfigParams
- func (c *ClusterConfig) NanomsgHost(nodeIndex int) string
- func (c *ClusterConfig) NanomsgHosts(nodeIndexes ...[]int) []string
- func (c *ClusterConfig) NanomsgPort(nodeIndex int) int
- func (c *ClusterConfig) PeeringHost(nodeIndex int) string
- func (c *ClusterConfig) PeeringHosts(nodeIndexes ...[]int) []string
- func (c *ClusterConfig) PeeringPort(nodeIndex int) int
- func (c *ClusterConfig) Save(dataPath string) error
- func (c *ClusterConfig) WaspConfigTemplateParams(i int) *templates.WaspConfigParams
- type GoshimmerConfig
- type MessageCounter
- type WaspConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigExists ¶ added in v0.1.0
Types ¶
type Chain ¶ added in v0.1.0
type Chain struct { Description string OriginatorSeed *seed.Seed CommitteeNodes []int Quorum uint16 Address address.Address ChainID coretypes.ChainID Color balance.Color Cluster *Cluster }
func (*Chain) ChainAddress ¶ added in v0.1.0
func (*Chain) Client ¶ added in v0.1.0
func (ch *Chain) Client(sigScheme signaturescheme.SignatureScheme) *chainclient.Client
func (*Chain) CommitteeMultiClient ¶ added in v0.1.0
func (ch *Chain) CommitteeMultiClient() *multiclient.MultiClient
func (*Chain) ContractID ¶ added in v0.1.0
func (ch *Chain) ContractID(contractHname coretypes.Hname) coretypes.ContractID
func (*Chain) DeployContract ¶ added in v0.1.0
func (ch *Chain) DeployContract(name string, progHashStr string, description string, initParams map[string]interface{}) (*sctransaction.Transaction, error)
func (*Chain) DeployWasmContract ¶ added in v0.1.0
func (ch *Chain) DeployWasmContract(name string, description string, progBinary []byte, initParams map[string]interface{}) (*sctransaction.Transaction, hashing.HashValue, error)
func (*Chain) DeployWasmContractOld ¶ added in v0.1.0
func (ch *Chain) DeployWasmContractOld(name string, description string, progBinary []byte, initParams map[string]interface{}) (*sctransaction.Transaction, hashing.HashValue, error)
func (*Chain) GetBlobFieldValue ¶ added in v0.1.0
func (*Chain) OriginatorAddress ¶ added in v0.1.0
func (*Chain) OriginatorClient ¶ added in v0.1.0
func (ch *Chain) OriginatorClient() *chainclient.Client
func (*Chain) OriginatorID ¶ added in v0.1.0
func (*Chain) OriginatorSigScheme ¶ added in v0.1.0
func (ch *Chain) OriginatorSigScheme() signaturescheme.SignatureScheme
func (*Chain) PeeringHosts ¶ added in v0.1.0
func (*Chain) SCClient ¶ added in v0.1.0
func (ch *Chain) SCClient(contractHname coretypes.Hname, sigScheme signaturescheme.SignatureScheme) *scclient.SCClient
func (*Chain) StartMessageCounter ¶ added in v0.1.0
func (ch *Chain) StartMessageCounter(expectations map[string]int) (*MessageCounter, error)
type Cluster ¶
type Cluster struct { Name string Config *ClusterConfig Started bool // contains filtered or unexported fields }
func New ¶
func New(name string, config *ClusterConfig) *Cluster
func (*Cluster) ActiveNodes ¶ added in v0.1.0
func (*Cluster) DeployChain ¶ added in v0.1.0
func (*Cluster) DeployDefaultChain ¶ added in v0.1.0
func (*Cluster) InitDataPath ¶ added in v0.1.0
func (cluster *Cluster) InitDataPath(templatesPath string, dataPath string, removeExisting bool) error
InitDataPath initializes the cluster data directory (cluster.json + one subdirectory for each node).
func (*Cluster) IsGoshimmerUp ¶
func (*Cluster) Level1Client ¶ added in v0.1.0
func (clu *Cluster) Level1Client() level1.Level1Client
func (*Cluster) MultiClient ¶ added in v0.1.0
func (cluster *Cluster) MultiClient() *multiclient.MultiClient
func (*Cluster) PostTransaction ¶
func (cluster *Cluster) PostTransaction(tx *sctransaction.Transaction) error
func (*Cluster) Start ¶
Start launches all wasp nodes in the cluster, each running in its own directory
func (*Cluster) StartMessageCounter ¶ added in v0.1.0
func (cluster *Cluster) StartMessageCounter(expectations map[string]int) (*MessageCounter, error)
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) VerifySCStateVariables2 ¶
func (*Cluster) WaspClient ¶ added in v0.1.0
func (cluster *Cluster) WaspClient(nodeIndex int) *client.WaspClient
type ClusterConfig ¶
type ClusterConfig struct { Wasp WaspConfig Goshimmer GoshimmerConfig }
func DefaultConfig ¶ added in v0.1.0
func DefaultConfig() *ClusterConfig
func LoadConfig ¶ added in v0.1.0
func LoadConfig(dataPath string) (*ClusterConfig, error)
func (*ClusterConfig) AllNodes ¶ added in v0.1.0
func (c *ClusterConfig) AllNodes() []int
func (*ClusterConfig) ApiHost ¶ added in v0.1.0
func (c *ClusterConfig) ApiHost(nodeIndex int) string
func (*ClusterConfig) ApiHosts ¶ added in v0.1.0
func (c *ClusterConfig) ApiHosts(nodeIndexes ...[]int) []string
func (*ClusterConfig) ApiPort ¶ added in v0.1.0
func (c *ClusterConfig) ApiPort(nodeIndex int) int
func (*ClusterConfig) DashboardPort ¶ added in v0.1.0
func (c *ClusterConfig) DashboardPort(nodeIndex int) int
func (*ClusterConfig) GoshimmerConfigTemplateParams ¶ added in v0.1.0
func (c *ClusterConfig) GoshimmerConfigTemplateParams() *templates.GoshimmerConfigParams
func (*ClusterConfig) NanomsgHost ¶ added in v0.1.0
func (c *ClusterConfig) NanomsgHost(nodeIndex int) string
func (*ClusterConfig) NanomsgHosts ¶ added in v0.1.0
func (c *ClusterConfig) NanomsgHosts(nodeIndexes ...[]int) []string
func (*ClusterConfig) NanomsgPort ¶ added in v0.1.0
func (c *ClusterConfig) NanomsgPort(nodeIndex int) int
func (*ClusterConfig) PeeringHost ¶ added in v0.1.0
func (c *ClusterConfig) PeeringHost(nodeIndex int) string
func (*ClusterConfig) PeeringHosts ¶ added in v0.1.0
func (c *ClusterConfig) PeeringHosts(nodeIndexes ...[]int) []string
func (*ClusterConfig) PeeringPort ¶ added in v0.1.0
func (c *ClusterConfig) PeeringPort(nodeIndex int) int
func (*ClusterConfig) Save ¶ added in v0.1.0
func (c *ClusterConfig) Save(dataPath string) error
func (*ClusterConfig) WaspConfigTemplateParams ¶ added in v0.1.0
func (c *ClusterConfig) WaspConfigTemplateParams(i int) *templates.WaspConfigParams
type GoshimmerConfig ¶ added in v0.1.0
type MessageCounter ¶ added in v0.1.0
type MessageCounter struct {
// contains filtered or unexported fields
}
func NewMessageCounter ¶ added in v0.1.0
func (*MessageCounter) Close ¶ added in v0.1.0
func (m *MessageCounter) Close()
func (*MessageCounter) CollectMessages ¶ added in v0.1.0
func (m *MessageCounter) CollectMessages(duration time.Duration)
func (*MessageCounter) Report ¶ added in v0.1.0
func (m *MessageCounter) Report() bool
func (*MessageCounter) WaitUntilExpectationsMet ¶ added in v0.1.0
func (m *MessageCounter) WaitUntilExpectationsMet() bool
Click to show internal directories.
Click to hide internal directories.