harness

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 36 Imported by: 5 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DTestHarness

type DTestHarness struct {
	io.Closer

	sync.Mutex
	// contains filtered or unexported fields
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL