cluster

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultReplicationFactor = 3
	DefaultNumMetaRepos      = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster interface {
	Setup(ctx context.Context, t *testing.T)

	StartAdminServer(ctx context.Context, t *testing.T)
	StopAdminServer(ctx context.Context, t *testing.T)
	AdminServerAddress(ctx context.Context, t *testing.T) string

	StartMetadataRepositoryNodes(ctx context.Context, t *testing.T, desired int)
	StopMetadataRepositoryNodes(ctx context.Context, t *testing.T)
	SetNumMetadataRepositories(ctx context.Context, t *testing.T, desired int)
	MetadataRepositoryAddress(ctx context.Context, t *testing.T) string

	StartStorageNodes(ctx context.Context, t *testing.T, desired int)
	StopStorageNodes(ctx context.Context, t *testing.T)
	StartStorageNode(ctx context.Context, t *testing.T, nodeName string) bool
	StopStorageNode(ctx context.Context, t *testing.T, snid types.StorageNodeID) (nodeName string)

	Controller() *controller.Controller

	String() string

	Close(ctx context.Context, t *testing.T)
}

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(t *testing.T, opts ...Option) (Config, error)

func (Config) ClusterID

func (c Config) ClusterID() types.ClusterID

func (Config) Logger

func (c Config) Logger() *zap.Logger

func (Config) NumMetaRepos

func (c Config) NumMetaRepos() int

func (Config) NumStorageNodes

func (c Config) NumStorageNodes() int

func (Config) ReplicationFactor

func (c Config) ReplicationFactor() int

type Option

type Option interface {
	// contains filtered or unexported methods
}

func NumMetadataRepositoryNodes

func NumMetadataRepositoryNodes(numMetaReposNodes int) Option

func NumStorageNodes

func NumStorageNodes(numStorageNodes int) Option

func WithClusterID

func WithClusterID(cid types.ClusterID) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithReplicationFactor

func WithReplicationFactor(replicationFactor int) Option

Directories

Path Synopsis
k8s

Jump to

Keyboard shortcuts

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