coordinator

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Database config
	Database *db.DatabaseConfig `yaml:"database" json:"database"`

	// List of execution & consensus clients to use.
	Endpoints []clients.ClientConfig `yaml:"endpoints" json:"endpoints"`

	// WebServer config
	Web *web_types.WebConfig `yaml:"web" json:"web"`

	// Validator names config
	ValidatorNames *names.Config `yaml:"validatorNames" json:"validatorNames"`

	// Global variables
	GlobalVars map[string]interface{} `yaml:"globalVars" json:"globalVars"`

	// Coordinator config
	Coordinator *CoordinatorConfig `yaml:"coordinator" json:"coordinator"`

	// List of Test configurations.
	Tests []*types.TestConfig `yaml:"tests" json:"tests"`

	// List of yaml files with test configurations
	ExternalTests []*types.ExternalTestConfig `yaml:"externalTests" json:"externalTests"`
}

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig represents a sane-default configuration.

func NewConfig

func NewConfig(path string) (*Config, error)

type Coordinator

type Coordinator struct {
	// Config is the coordinator configuration.
	Config *Config
	// contains filtered or unexported fields
}

func NewCoordinator

func NewCoordinator(config *Config, log logrus.FieldLogger, metricsPort int) *Coordinator

func (*Coordinator) ClientPool

func (c *Coordinator) ClientPool() *clients.ClientPool

func (*Coordinator) Database added in v0.0.12

func (c *Coordinator) Database() *db.Database

func (*Coordinator) DeleteTestRun added in v0.0.12

func (c *Coordinator) DeleteTestRun(runID uint64) error

func (*Coordinator) GetTestByRunID added in v0.0.4

func (c *Coordinator) GetTestByRunID(runID uint64) types.Test

func (*Coordinator) GetTestHistory added in v0.0.4

func (c *Coordinator) GetTestHistory(testID string, firstRunID, offset, limit uint64) (tests []types.Test, totalTests int)

func (*Coordinator) GetTestQueue added in v0.0.4

func (c *Coordinator) GetTestQueue() []types.Test

func (*Coordinator) GlobalVariables added in v0.0.6

func (c *Coordinator) GlobalVariables() types.Variables

func (*Coordinator) LogReader added in v0.0.12

func (c *Coordinator) LogReader() logger.LogReader

func (*Coordinator) Logger

func (c *Coordinator) Logger() logrus.FieldLogger

func (*Coordinator) Run

func (c *Coordinator) Run(ctx context.Context) error

Run executes the coordinator until completion.

func (*Coordinator) ScheduleTest added in v0.0.4

func (c *Coordinator) ScheduleTest(descriptor types.TestDescriptor, configOverrides map[string]any, allowDuplicate bool) (types.TestRunner, error)

func (*Coordinator) TestRegistry added in v0.0.12

func (c *Coordinator) TestRegistry() types.TestRegistry

func (*Coordinator) ValidatorNames

func (c *Coordinator) ValidatorNames() *names.ValidatorNames

func (*Coordinator) WalletManager

func (c *Coordinator) WalletManager() *wallet.Manager

type CoordinatorConfig added in v0.0.6

type CoordinatorConfig struct {
	// Maximum number of tests executed concurrently
	MaxConcurrentTests uint64 `yaml:"maxConcurrentTests" json:"maxConcurrentTests"`

	// Test history cleanup delay
	TestRetentionTime helper.Duration `yaml:"testRetentionTime" json:"testRetentionTime"`
}

type TestRegistry added in v0.0.12

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

func NewTestRegistry added in v0.0.12

func NewTestRegistry(coordinator types.Coordinator) *TestRegistry

func (*TestRegistry) AddExternalTest added in v0.0.12

func (c *TestRegistry) AddExternalTest(ctx context.Context, extTestCfg *types.ExternalTestConfig) (types.TestDescriptor, error)

func (*TestRegistry) AddLocalTest added in v0.0.12

func (c *TestRegistry) AddLocalTest(testConfig *types.TestConfig) (types.TestDescriptor, error)

func (*TestRegistry) DeleteTest added in v0.0.12

func (c *TestRegistry) DeleteTest(testID string) error

func (*TestRegistry) GetTestDescriptors added in v0.0.12

func (c *TestRegistry) GetTestDescriptors() []types.TestDescriptor

func (*TestRegistry) LoadTests added in v0.0.12

func (c *TestRegistry) LoadTests(ctx context.Context, local []*types.TestConfig, external []*types.ExternalTestConfig)

type TestRunner added in v0.0.12

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

func NewTestRunner added in v0.0.12

func NewTestRunner(coordinator types.Coordinator, lastRunID uint64) *TestRunner

func (*TestRunner) GetTestByRunID added in v0.0.12

func (c *TestRunner) GetTestByRunID(runID uint64) types.Test

func (*TestRunner) GetTestQueue added in v0.0.12

func (c *TestRunner) GetTestQueue() []types.Test

func (*TestRunner) RemoveTestFromQueue added in v0.0.12

func (c *TestRunner) RemoveTestFromQueue(runID uint64) bool

func (*TestRunner) RunTestCleanup added in v0.0.12

func (c *TestRunner) RunTestCleanup(ctx context.Context, retentionTime time.Duration)

func (*TestRunner) RunTestExecutionLoop added in v0.0.12

func (c *TestRunner) RunTestExecutionLoop(ctx context.Context, concurrencyLimit uint64)

func (*TestRunner) RunTestScheduler added in v0.0.12

func (c *TestRunner) RunTestScheduler(ctx context.Context)

func (*TestRunner) ScheduleTest added in v0.0.12

func (c *TestRunner) ScheduleTest(descriptor types.TestDescriptor, configOverrides map[string]any, allowDuplicate bool) (types.TestRunner, error)

Jump to

Keyboard shortcuts

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