harness

package
v0.15.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 37 Imported by: 2

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