Documentation ¶
Index ¶
- Constants
- func HandleRunCancelation(updater RunUpdater, tracer trace.Tracer, eventEmitter EventEmitter) runCancelHandlerFn
- func NewAssertionRunner(updater RunUpdater, assertionExecutor AssertionExecutor, op OutputsProcessorFn, ...) *defaultAssertionRunner
- func NewLinterRunner(updater RunUpdater, subscriptionManager *subscription.Manager, ...) *defaultLinterRunner
- func NewQueueConfigurer() *queueConfigurer[Job]
- func NewSelectorBasedPoller(innerPoller pollerExecutor, eventEmitter EventEmitter) selectorBasedPollerExecutor
- func NewTestSuiteRunner(testRunner testRunner, transactionRuns testSuiteRunRepository, ...) *persistentTransactionRunner
- func NewTracePoller(pe pollerExecutor, updater RunUpdater, ...) *tracePoller
- func NewTriggerExecuterWorker(triggers *triggerer.Registry, updater RunUpdater, tracer trace.Tracer, ...) *triggerExecuterWorker
- func NewTriggerResolverWorker(triggers *triggerer.Registry, updater RunUpdater, tracer trace.Tracer, ...) *triggerResolverWorker
- func NewTriggerResultProcessorWorker(tracer trace.Tracer, subscriptionManager *subscription.Manager, ...) *triggerResultProcessorWorker
- type AnalyzerGetter
- type AssertionExecutor
- type CompositeTransactionUpdater
- type CompositeUpdater
- type DefaultPollerExecutor
- type EventEmitter
- type InstrumentedPollerExecutor
- type Job
- type JsonJob
- type OutputsProcessorFn
- type PersistentTracePoller
- type PollResult
- type Queue
- type RunResult
- type RunUpdater
- type StopRequest
- type TestPipeline
- type TestSuiteRunUpdater
- type TestSuitesPipeline
- type TraceFetcher
- type TracePoller
- type WorkerMiddlewareBuilder
- type WorkerPool
Constants ¶
View Source
const (
JobCountHeader string = "X-Tracetest-Job-Count"
)
View Source
const PollingRequestStartIteration = 1
Variables ¶
This section is empty.
Functions ¶
func HandleRunCancelation ¶
func HandleRunCancelation(updater RunUpdater, tracer trace.Tracer, eventEmitter EventEmitter) runCancelHandlerFn
func NewAssertionRunner ¶
func NewAssertionRunner( updater RunUpdater, assertionExecutor AssertionExecutor, op OutputsProcessorFn, subscriptionManager *subscription.Manager, eventEmitter EventEmitter, ) *defaultAssertionRunner
func NewLinterRunner ¶
func NewLinterRunner( updater RunUpdater, subscriptionManager *subscription.Manager, eventEmitter EventEmitter, analyzerGetter AnalyzerGetter, ) *defaultLinterRunner
func NewQueueConfigurer ¶
func NewQueueConfigurer() *queueConfigurer[Job]
func NewSelectorBasedPoller ¶
func NewSelectorBasedPoller(innerPoller pollerExecutor, eventEmitter EventEmitter) selectorBasedPollerExecutor
func NewTestSuiteRunner ¶
func NewTestSuiteRunner( testRunner testRunner, transactionRuns testSuiteRunRepository, subscriptionManager *subscription.Manager, ) *persistentTransactionRunner
func NewTracePoller ¶
func NewTracePoller( pe pollerExecutor, updater RunUpdater, subscriptionManager *subscription.Manager, eventEmitter EventEmitter, ) *tracePoller
func NewTriggerExecuterWorker ¶
func NewTriggerExecuterWorker( triggers *triggerer.Registry, updater RunUpdater, tracer trace.Tracer, eventEmitter EventEmitter, enabled bool, ) *triggerExecuterWorker
func NewTriggerResolverWorker ¶
func NewTriggerResolverWorker( triggers *triggerer.Registry, updater RunUpdater, tracer trace.Tracer, newTraceDBFn tracedb.FactoryFunc, dsRepo currentDataStoreGetter, eventEmitter EventEmitter, ) *triggerResolverWorker
func NewTriggerResultProcessorWorker ¶
func NewTriggerResultProcessorWorker( tracer trace.Tracer, subscriptionManager *subscription.Manager, eventEmitter EventEmitter, updater RunUpdater, ) *triggerResultProcessorWorker
Types ¶
type AnalyzerGetter ¶
type AssertionExecutor ¶
type AssertionExecutor interface {
Assert(context.Context, test.Specs, traces.Trace, []expression.DataStore) (maps.Ordered[test.SpanQuery, []test.AssertionResult], bool)
}
func NewAssertionExecutor ¶
func NewAssertionExecutor(tracer trace.Tracer) AssertionExecutor
type CompositeTransactionUpdater ¶
type CompositeTransactionUpdater struct {
// contains filtered or unexported fields
}
func (CompositeTransactionUpdater) Update ¶
func (u CompositeTransactionUpdater) Update(ctx context.Context, run testsuite.TestSuiteRun) error
type CompositeUpdater ¶
type CompositeUpdater struct {
// contains filtered or unexported fields
}
func (CompositeUpdater) Add ¶
func (u CompositeUpdater) Add(l RunUpdater) CompositeUpdater
type DefaultPollerExecutor ¶
type DefaultPollerExecutor struct {
// contains filtered or unexported fields
}
func (DefaultPollerExecutor) ExecuteRequest ¶
func (pe DefaultPollerExecutor) ExecuteRequest(ctx context.Context, job *Job) (PollResult, error)
type EventEmitter ¶
type EventEmitter interface {
Emit(ctx context.Context, event model.TestRunEvent) error
}
func NewEventEmitter ¶
func NewEventEmitter(repository model.TestRunEventRepository, publisher publisher) EventEmitter
type InstrumentedPollerExecutor ¶
type InstrumentedPollerExecutor struct {
// contains filtered or unexported fields
}
func NewPollerExecutor ¶
func NewPollerExecutor( tracer trace.Tracer, updater RunUpdater, newTraceDBFn tracedb.FactoryFunc, dsRepo resourcemanager.Current[datastore.DataStore], eventEmitter EventEmitter, ) *InstrumentedPollerExecutor
func (InstrumentedPollerExecutor) ExecuteRequest ¶
func (pe InstrumentedPollerExecutor) ExecuteRequest(ctx context.Context, job *Job) (PollResult, error)
type Job ¶
type Job struct { Headers *headers TestSuite testsuite.TestSuite TestSuiteRun testsuite.TestSuiteRun Test test.Test Run test.Run PollingProfile pollingprofile.PollingProfile DataStore datastore.DataStore }
func (Job) EnqueueCount ¶
func (*Job) IncreaseEnqueueCount ¶
func (j *Job) IncreaseEnqueueCount()
func (Job) MarshalJSON ¶
func (*Job) UnmarshalJSON ¶
type JsonJob ¶
type JsonJob struct { Headers *headers `json:"headers"` TestSuiteID string `json:"test_suite_id"` TestSuiteRunID int `json:"test_suite_run_id"` TestID string `json:"test_id"` TestVersion int `json:"test_version"` RunID int `json:"run_id"` TraceID string `json:"trace_id"` PollingProfileID string `json:"polling_profile_id"` DataStoreID string `json:"data_store_id"` }
type OutputsProcessorFn ¶
type OutputsProcessorFn func(context.Context, test.Outputs, traces.Trace, []expression.DataStore) (maps.Ordered[string, test.RunOutput], error)
func InstrumentedOutputProcessor ¶
func InstrumentedOutputProcessor(tracer trace.Tracer) OutputsProcessorFn
type PersistentTracePoller ¶
type PersistentTracePoller interface { TracePoller WorkerPool }
type PollResult ¶
type PollResult struct {
// contains filtered or unexported fields
}
func NewPollResult ¶
func NewPollResult(finished bool, reason string, run test.Run) PollResult
func (PollResult) Finished ¶
func (pr PollResult) Finished() bool
func (PollResult) Reason ¶
func (pr PollResult) Reason() string
func (PollResult) Run ¶
func (pr PollResult) Run() test.Run
type RunUpdater ¶
func NewDBUpdater ¶
func NewDBUpdater(repo runDBUpdater) RunUpdater
func NewSubscriptionUpdater ¶
func NewSubscriptionUpdater(manager *subscription.Manager) RunUpdater
type StopRequest ¶
func (StopRequest) ResourceID ¶
func (sr StopRequest) ResourceID() string
type TestPipeline ¶
func NewTestPipeline ¶
func (*TestPipeline) Run ¶
func (p *TestPipeline) Run(ctx context.Context, testObj test.Test, metadata test.RunMetadata, variableSet variableset.VariableSet, requiredGates *[]testrunner.RequiredGate) test.Run
type TestSuiteRunUpdater ¶
type TestSuiteRunUpdater interface {
Update(context.Context, testsuite.TestSuiteRun) error
}
func NewDBTranasctionUpdater ¶
func NewDBTranasctionUpdater(repo transactionUpdater) TestSuiteRunUpdater
func NewSubscriptionTransactionUpdater ¶
func NewSubscriptionTransactionUpdater(manager *subscription.Manager) TestSuiteRunUpdater
type TestSuitesPipeline ¶
type TestSuitesPipeline struct { *pipeline.Pipeline[Job] // contains filtered or unexported fields }
func NewTestSuitePipeline ¶
func NewTestSuitePipeline( pipeline *pipeline.Pipeline[Job], runs testSuiteRunRepo, ) *TestSuitesPipeline
func (*TestSuitesPipeline) Run ¶
func (p *TestSuitesPipeline) Run(ctx context.Context, tran testsuite.TestSuite, metadata test.RunMetadata, variableSet variableset.VariableSet, requiredGates *[]testrunner.RequiredGate) testsuite.TestSuiteRun
type TraceFetcher ¶
type TracePoller ¶
type TracePoller interface {
Poll(context.Context, test.Test, test.Run, pollingprofile.PollingProfile)
}
type WorkerMiddlewareBuilder ¶
type WorkerMiddlewareBuilder interface {
New(name string, next pipeline.StepProcessor[Job]) pipeline.StepProcessor[Job]
}
func NewWorkerMetricMiddlewareBuilder ¶
func NewWorkerMetricMiddlewareBuilder(meter metric.Meter) WorkerMiddlewareBuilder
type WorkerPool ¶
type WorkerPool interface { Start(workers int) Stop() }
Source Files ¶
- assertion_executor.go
- assertion_runner.go
- default_poller_executor.go
- eventemitter.go
- linter_runner.go
- outputs_processor.go
- queue.go
- run_updater.go
- selector_based_poller_executor.go
- test_pipeline.go
- test_suite_run_updater.go
- test_suite_runner.go
- test_suites_pipeline.go
- trace_poller.go
- trigger_executer_worker.go
- trigger_resolver_worker.go
- trigger_result_processor_worker.go
- worker.go
- worker_metric_middleware.go
Click to show internal directories.
Click to hide internal directories.