Documentation
¶
Index ¶
- type Config
- type Coordinator
- func (c *Coordinator) ClientPool() *clients.ClientPool
- func (c *Coordinator) Database() *db.Database
- func (c *Coordinator) DeleteTestRun(runID uint64) error
- func (c *Coordinator) EventBus() *events.EventBus
- func (c *Coordinator) GetTestByRunID(runID uint64) types.Test
- func (c *Coordinator) GetTestHistory(testID string, firstRunID, offset, limit uint64) (tests []types.Test, totalTests uint64)
- func (c *Coordinator) GetTestQueue() []types.Test
- func (c *Coordinator) GlobalVariables() types.Variables
- func (c *Coordinator) LogReader() logger.LogReader
- func (c *Coordinator) Logger() logrus.FieldLogger
- func (c *Coordinator) Run(ctx context.Context) error
- func (c *Coordinator) ScheduleTest(descriptor types.TestDescriptor, configOverrides map[string]any, ...) (types.TestRunner, error)
- func (c *Coordinator) TestRegistry() types.TestRegistry
- func (c *Coordinator) ValidatorNames() *names.ValidatorNames
- func (c *Coordinator) WalletManager() *txmgr.Spamoor
- type CoordinatorConfig
- type TestRegistry
- func (c *TestRegistry) AddExternalTest(ctx context.Context, extTestCfg *types.ExternalTestConfig) (types.TestDescriptor, error)
- func (c *TestRegistry) AddLocalTest(testConfig *types.TestConfig) (types.TestDescriptor, error)
- func (c *TestRegistry) AddLocalTestWithYaml(testConfig *types.TestConfig, yamlSource string) (types.TestDescriptor, error)
- func (c *TestRegistry) DeleteTest(testID string) error
- func (c *TestRegistry) GetTestDescriptors() []types.TestDescriptor
- func (c *TestRegistry) LoadTests(ctx context.Context, local []*types.TestConfig, ...)
- type TestRunner
- func (c *TestRunner) GetTestByRunID(runID uint64) types.Test
- func (c *TestRunner) GetTestQueue() []types.Test
- func (c *TestRunner) RemoveTestFromQueue(runID uint64) bool
- func (c *TestRunner) RunOffQueueTestExecutionLoop(ctx context.Context)
- func (c *TestRunner) RunTestCleanup(ctx context.Context, retentionTime time.Duration)
- func (c *TestRunner) RunTestExecutionLoop(ctx context.Context, concurrencyLimit uint64)
- func (c *TestRunner) RunTestScheduler(ctx context.Context)
- func (c *TestRunner) ScheduleTest(descriptor types.TestDescriptor, configOverrides map[string]any, ...) (types.TestRunner, error)
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]any `yaml:"globalVars" json:"globalVars"`
// Coordinator config
Coordinator *CoordinatorConfig `yaml:"coordinator" json:"coordinator"`
// AI assistant config
AI *web_types.AIConfig `yaml:"ai" json:"ai"`
// 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.
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 ¶
func (c *Coordinator) Database() *db.Database
func (*Coordinator) DeleteTestRun ¶
func (c *Coordinator) DeleteTestRun(runID uint64) error
func (*Coordinator) EventBus ¶
func (c *Coordinator) EventBus() *events.EventBus
func (*Coordinator) GetTestByRunID ¶
func (c *Coordinator) GetTestByRunID(runID uint64) types.Test
func (*Coordinator) GetTestHistory ¶
func (*Coordinator) GetTestQueue ¶
func (c *Coordinator) GetTestQueue() []types.Test
func (*Coordinator) GlobalVariables ¶
func (c *Coordinator) GlobalVariables() types.Variables
func (*Coordinator) LogReader ¶
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 ¶
func (c *Coordinator) ScheduleTest(descriptor types.TestDescriptor, configOverrides map[string]any, allowDuplicate, skipQueue bool) (types.TestRunner, error)
func (*Coordinator) TestRegistry ¶
func (c *Coordinator) TestRegistry() types.TestRegistry
func (*Coordinator) ValidatorNames ¶
func (c *Coordinator) ValidatorNames() *names.ValidatorNames
func (*Coordinator) WalletManager ¶
func (c *Coordinator) WalletManager() *txmgr.Spamoor
type CoordinatorConfig ¶
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"`
}
func (*CoordinatorConfig) Validate ¶
func (c *CoordinatorConfig) Validate() error
type TestRegistry ¶
type TestRegistry struct {
// contains filtered or unexported fields
}
func NewTestRegistry ¶
func NewTestRegistry(coordinator types.Coordinator) *TestRegistry
func (*TestRegistry) AddExternalTest ¶
func (c *TestRegistry) AddExternalTest(ctx context.Context, extTestCfg *types.ExternalTestConfig) (types.TestDescriptor, error)
func (*TestRegistry) AddLocalTest ¶
func (c *TestRegistry) AddLocalTest(testConfig *types.TestConfig) (types.TestDescriptor, error)
func (*TestRegistry) AddLocalTestWithYaml ¶
func (c *TestRegistry) AddLocalTestWithYaml(testConfig *types.TestConfig, yamlSource string) (types.TestDescriptor, error)
func (*TestRegistry) DeleteTest ¶
func (c *TestRegistry) DeleteTest(testID string) error
func (*TestRegistry) GetTestDescriptors ¶
func (c *TestRegistry) GetTestDescriptors() []types.TestDescriptor
func (*TestRegistry) LoadTests ¶
func (c *TestRegistry) LoadTests(ctx context.Context, local []*types.TestConfig, external []*types.ExternalTestConfig)
type TestRunner ¶
type TestRunner struct {
// contains filtered or unexported fields
}
func NewTestRunner ¶
func NewTestRunner(coordinator types.Coordinator, lastRunID uint64) *TestRunner
func (*TestRunner) GetTestByRunID ¶
func (c *TestRunner) GetTestByRunID(runID uint64) types.Test
func (*TestRunner) GetTestQueue ¶
func (c *TestRunner) GetTestQueue() []types.Test
func (*TestRunner) RemoveTestFromQueue ¶
func (c *TestRunner) RemoveTestFromQueue(runID uint64) bool
func (*TestRunner) RunOffQueueTestExecutionLoop ¶
func (c *TestRunner) RunOffQueueTestExecutionLoop(ctx context.Context)
func (*TestRunner) RunTestCleanup ¶
func (c *TestRunner) RunTestCleanup(ctx context.Context, retentionTime time.Duration)
func (*TestRunner) RunTestExecutionLoop ¶
func (c *TestRunner) RunTestExecutionLoop(ctx context.Context, concurrencyLimit uint64)
func (*TestRunner) RunTestScheduler ¶
func (c *TestRunner) RunTestScheduler(ctx context.Context)
func (*TestRunner) ScheduleTest ¶
func (c *TestRunner) ScheduleTest(descriptor types.TestDescriptor, configOverrides map[string]any, allowDuplicate, skipQueue bool) (types.TestRunner, error)
Click to show internal directories.
Click to hide internal directories.