Documentation ¶
Index ¶
- type Cluster
- func (c *Cluster) AddBootnodes(cctx *testcontext.Context, n int) error
- func (c *Cluster) AddPoet(cctx *testcontext.Context) error
- func (c *Cluster) AddSmeshers(cctx *testcontext.Context, n int) error
- func (a *Cluster) Address(i int) string
- func (c *Cluster) Client(i int) *NodeClient
- func (a *Cluster) Private(i int) ed25519.PrivateKey
- func (c *Cluster) Total() int
- func (c *Cluster) Wait(tctx *testcontext.Context, i int) error
- type DeploymentFlag
- func Accounts(accounts map[string]uint64) DeploymentFlag
- func Bootnodes(bootnodes ...string) DeploymentFlag
- func GenesisTime(t time.Time) DeploymentFlag
- func NetworkID(id uint32) DeploymentFlag
- func PoetEndpoint(endpoint string) DeploymentFlag
- func RerunInterval(duration time.Duration) DeploymentFlag
- func TargetOutbound(target int) DeploymentFlag
- type Node
- type NodeClient
- type Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster for managing state of the spacemesh cluster.
func Default ¶
func Default(cctx *testcontext.Context, opts ...Opt) (*Cluster, error)
Default deployes bootnodes, one poet and the smeshers according to the cluster size.
func New ¶
func New(cctx *testcontext.Context, opts ...Opt) *Cluster
New initializes Cluster with options.
func (*Cluster) AddBootnodes ¶
func (c *Cluster) AddBootnodes(cctx *testcontext.Context, n int) error
AddBootnodes ...
func (*Cluster) AddSmeshers ¶
func (c *Cluster) AddSmeshers(cctx *testcontext.Context, n int) error
AddSmeshers ...
func (*Cluster) Client ¶
func (c *Cluster) Client(i int) *NodeClient
Client returns client for i-th node, either bootnode or smesher.
func (*Cluster) Private ¶
func (a *Cluster) Private(i int) ed25519.PrivateKey
type DeploymentFlag ¶
type DeploymentFlag struct {
Name, Value string
}
DeploymentFlag allows to configure specific flags for application binaries.
func (DeploymentFlag) Flag ¶
func (d DeploymentFlag) Flag() string
Flag returns parseable flag from Name and Value.
type Node ¶
Node ...
func (Node) GRPCEndpoint ¶
GRPCEndpoint returns grpc endpoint for the Node.
func (Node) P2PEndpoint ¶
P2PEndpoint returns full p2p endpoint, including identity.
type NodeClient ¶
type NodeClient struct { Node *grpc.ClientConn }
NodeClient is a Node with attached grpc connection.
Click to show internal directories.
Click to hide internal directories.