Documentation ¶
Index ¶
- type DTestHarness
- func (dt *DTestHarness) AllShardsAvailable() bool
- func (dt *DTestHarness) AnyInstanceShardHasState(id string, state shard.State) bool
- func (dt *DTestHarness) BootstrapTimeout() time.Duration
- func (dt *DTestHarness) Close() error
- func (dt *DTestHarness) Cluster() cluster.Cluster
- func (dt *DTestHarness) ClusterOptions() cluster.Options
- func (dt *DTestHarness) Configuration() *config.Configuration
- func (dt *DTestHarness) Nodes() []m3emnode.Node
- func (dt *DTestHarness) Seed(nodes []node.ServiceNode) error
- func (dt *DTestHarness) SetClusterOptions(co cluster.Options)
- func (dt *DTestHarness) WaitUntilAllBootstrapped(nodes []node.ServiceNode) error
- func (dt *DTestHarness) WaitUntilAllShardsAvailable() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DTestHarness ¶
DTestHarness makes it easier to maintain the lifecycle of resources used for DTests.
func New ¶
func New(cliOpts *config.Args, rawLogger *zap.Logger) *DTestHarness
New constructs a new DTestHarness
func (*DTestHarness) AllShardsAvailable ¶
func (dt *DTestHarness) AllShardsAvailable() bool
AllShardsAvailable returns if the placement service has all shards marked available
func (*DTestHarness) AnyInstanceShardHasState ¶
func (dt *DTestHarness) AnyInstanceShardHasState(id string, state shard.State) bool
AnyInstanceShardHasState returns a flag if the placement service has any instance with the specified shard state
func (*DTestHarness) BootstrapTimeout ¶
func (dt *DTestHarness) BootstrapTimeout() time.Duration
BootstrapTimeout returns the bootstrap timeout configued
func (*DTestHarness) Close ¶
func (dt *DTestHarness) Close() error
Close releases any resources held by the harness
func (*DTestHarness) Cluster ¶
func (dt *DTestHarness) Cluster() cluster.Cluster
Cluster constructs a cluster based on the options set in the harness
func (*DTestHarness) ClusterOptions ¶
func (dt *DTestHarness) ClusterOptions() cluster.Options
ClusterOptions returns the cluster options
func (*DTestHarness) Configuration ¶
func (dt *DTestHarness) Configuration() *config.Configuration
Configuration returns the parsed configuration struct
func (*DTestHarness) Nodes ¶
func (dt *DTestHarness) Nodes() []m3emnode.Node
Nodes returns the m3emnode.Node(s)
func (*DTestHarness) Seed ¶
func (dt *DTestHarness) Seed(nodes []node.ServiceNode) error
Seed seeds the cluster nodes within the placement with data
func (*DTestHarness) SetClusterOptions ¶
func (dt *DTestHarness) SetClusterOptions(co cluster.Options)
SetClusterOptions sets the cluster options
func (*DTestHarness) WaitUntilAllBootstrapped ¶
func (dt *DTestHarness) WaitUntilAllBootstrapped(nodes []node.ServiceNode) error
WaitUntilAllBootstrapped waits until all the provided nodes are bootstrapped, or the configured bootstrap timeout period; whichever is sooner. It returns an error indicating if all the nodes finished bootstrapping.
func (*DTestHarness) WaitUntilAllShardsAvailable ¶
func (dt *DTestHarness) WaitUntilAllShardsAvailable() error
WaitUntilAllShardsAvailable waits until the placement service has all shards marked available, or the configured bootstrap timeout period; whichever is sooner. It returns an error indicating if all the nodes finished bootstrapping.