builder

package
v0.0.0-...-4475e27 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Benchmark

type Benchmark interface {
	Run(ctx context.Context) (<-chan []beat.Event, error)
	Stop()
}

type Builder

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

func New

func New(options ...Option) *Builder

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, log *logp.Logger, cfg *config.Config, resourceCh chan fetching.ResourceInfo, reg registry.Registry) (Benchmark, error)

func (*Builder) BuildK8s

func (b *Builder) BuildK8s(ctx context.Context, log *logp.Logger, cfg *config.Config, resourceCh chan fetching.ResourceInfo, reg registry.Registry, k8sLeaderElector uniqueness.Manager) (Benchmark, error)

type Evaluator

type Evaluator interface {
	Eval(ctx context.Context, resource fetching.ResourceInfo) (evaluator.EventData, error)
}

type Manager

type Manager interface {
	Run()
	Stop()
}

type MockBenchmark

type MockBenchmark struct {
	mock.Mock
}

MockBenchmark is an autogenerated mock type for the Benchmark type

func NewMockBenchmark

func NewMockBenchmark(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBenchmark

NewMockBenchmark creates a new instance of MockBenchmark. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockBenchmark) EXPECT

func (_m *MockBenchmark) EXPECT() *MockBenchmark_Expecter

func (*MockBenchmark) Run

func (_m *MockBenchmark) Run(ctx context.Context) (<-chan []beat.Event, error)

Run provides a mock function with given fields: ctx

func (*MockBenchmark) Stop

func (_m *MockBenchmark) Stop()

Stop provides a mock function with given fields:

type MockBenchmark_Expecter

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

func (*MockBenchmark_Expecter) Run

func (_e *MockBenchmark_Expecter) Run(ctx interface{}) *MockBenchmark_Run_Call

Run is a helper method to define mock.On call

  • ctx context.Context

func (*MockBenchmark_Expecter) Stop

Stop is a helper method to define mock.On call

type MockBenchmark_Run_Call

type MockBenchmark_Run_Call struct {
	*mock.Call
}

MockBenchmark_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'

func (*MockBenchmark_Run_Call) Return

func (_c *MockBenchmark_Run_Call) Return(_a0 <-chan []beat.Event, _a1 error) *MockBenchmark_Run_Call

func (*MockBenchmark_Run_Call) Run

func (*MockBenchmark_Run_Call) RunAndReturn

func (_c *MockBenchmark_Run_Call) RunAndReturn(run func(context.Context) (<-chan []beat.Event, error)) *MockBenchmark_Run_Call

type MockBenchmark_Stop_Call

type MockBenchmark_Stop_Call struct {
	*mock.Call
}

MockBenchmark_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'

func (*MockBenchmark_Stop_Call) Return

func (*MockBenchmark_Stop_Call) Run

func (_c *MockBenchmark_Stop_Call) Run(run func()) *MockBenchmark_Stop_Call

func (*MockBenchmark_Stop_Call) RunAndReturn

func (_c *MockBenchmark_Stop_Call) RunAndReturn(run func()) *MockBenchmark_Stop_Call

type MockEvaluator

type MockEvaluator struct {
	mock.Mock
}

MockEvaluator is an autogenerated mock type for the Evaluator type

func NewMockEvaluator

func NewMockEvaluator(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockEvaluator

NewMockEvaluator creates a new instance of MockEvaluator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockEvaluator) EXPECT

func (_m *MockEvaluator) EXPECT() *MockEvaluator_Expecter

func (*MockEvaluator) Eval

Eval provides a mock function with given fields: ctx, resource

type MockEvaluator_Eval_Call

type MockEvaluator_Eval_Call struct {
	*mock.Call
}

MockEvaluator_Eval_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Eval'

func (*MockEvaluator_Eval_Call) Return

func (*MockEvaluator_Eval_Call) Run

func (*MockEvaluator_Eval_Call) RunAndReturn

type MockEvaluator_Expecter

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

func (*MockEvaluator_Expecter) Eval

func (_e *MockEvaluator_Expecter) Eval(ctx interface{}, resource interface{}) *MockEvaluator_Eval_Call

Eval is a helper method to define mock.On call

  • ctx context.Context
  • resource fetching.ResourceInfo

type MockManager

type MockManager struct {
	mock.Mock
}

MockManager is an autogenerated mock type for the Manager type

func NewMockManager

func NewMockManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockManager

NewMockManager creates a new instance of MockManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockManager) EXPECT

func (_m *MockManager) EXPECT() *MockManager_Expecter

func (*MockManager) Run

func (_m *MockManager) Run()

Run provides a mock function with given fields:

func (*MockManager) Stop

func (_m *MockManager) Stop()

Stop provides a mock function with given fields:

type MockManager_Expecter

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

func (*MockManager_Expecter) Run

Run is a helper method to define mock.On call

func (*MockManager_Expecter) Stop

Stop is a helper method to define mock.On call

type MockManager_Run_Call

type MockManager_Run_Call struct {
	*mock.Call
}

MockManager_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run'

func (*MockManager_Run_Call) Return

func (*MockManager_Run_Call) Run

func (_c *MockManager_Run_Call) Run(run func()) *MockManager_Run_Call

func (*MockManager_Run_Call) RunAndReturn

func (_c *MockManager_Run_Call) RunAndReturn(run func()) *MockManager_Run_Call

type MockManager_Stop_Call

type MockManager_Stop_Call struct {
	*mock.Call
}

MockManager_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'

func (*MockManager_Stop_Call) Return

func (*MockManager_Stop_Call) Run

func (_c *MockManager_Stop_Call) Run(run func()) *MockManager_Stop_Call

func (*MockManager_Stop_Call) RunAndReturn

func (_c *MockManager_Stop_Call) RunAndReturn(run func()) *MockManager_Stop_Call

type MockOption

type MockOption struct {
	mock.Mock
}

MockOption is an autogenerated mock type for the Option type

func NewMockOption

func NewMockOption(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockOption

NewMockOption creates a new instance of MockOption. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockOption) EXPECT

func (_m *MockOption) EXPECT() *MockOption_Expecter

func (*MockOption) Execute

func (_m *MockOption) Execute(b *Builder)

Execute provides a mock function with given fields: b

type MockOption_Execute_Call

type MockOption_Execute_Call struct {
	*mock.Call
}

MockOption_Execute_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Execute'

func (*MockOption_Execute_Call) Return

func (*MockOption_Execute_Call) Run

func (*MockOption_Execute_Call) RunAndReturn

func (_c *MockOption_Execute_Call) RunAndReturn(run func(*Builder)) *MockOption_Execute_Call

type MockOption_Expecter

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

func (*MockOption_Expecter) Execute

func (_e *MockOption_Expecter) Execute(b interface{}) *MockOption_Execute_Call

Execute is a helper method to define mock.On call

  • b *Builder

type MockTransformer

type MockTransformer struct {
	mock.Mock
}

MockTransformer is an autogenerated mock type for the Transformer type

func NewMockTransformer

func NewMockTransformer(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTransformer

NewMockTransformer creates a new instance of MockTransformer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockTransformer) CreateBeatEvents

func (_m *MockTransformer) CreateBeatEvents(ctx context.Context, data evaluator.EventData) ([]beat.Event, error)

CreateBeatEvents provides a mock function with given fields: ctx, data

func (*MockTransformer) EXPECT

type MockTransformer_CreateBeatEvents_Call

type MockTransformer_CreateBeatEvents_Call struct {
	*mock.Call
}

MockTransformer_CreateBeatEvents_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateBeatEvents'

func (*MockTransformer_CreateBeatEvents_Call) Return

func (*MockTransformer_CreateBeatEvents_Call) Run

func (*MockTransformer_CreateBeatEvents_Call) RunAndReturn

type MockTransformer_Expecter

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

func (*MockTransformer_Expecter) CreateBeatEvents

func (_e *MockTransformer_Expecter) CreateBeatEvents(ctx interface{}, data interface{}) *MockTransformer_CreateBeatEvents_Call

CreateBeatEvents is a helper method to define mock.On call

  • ctx context.Context
  • data evaluator.EventData

type Option

type Option func(b *Builder)

func WithBenchmarkDataProvider

func WithBenchmarkDataProvider(cdp dataprovider.CommonDataProvider) Option

func WithIdProvider

func WithIdProvider(idp dataprovider.IdProvider) Option

func WithManagerTimeout

func WithManagerTimeout(timeout time.Duration) Option

type Transformer

type Transformer interface {
	CreateBeatEvents(ctx context.Context, data evaluator.EventData) ([]beat.Event, error)
}

Jump to

Keyboard shortcuts

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