registry

package
v0.0.0-...-27baac2 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchersMap

type FetchersMap map[string]RegisteredFetcher

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(r *registry)

Execute provides a mock function with given fields: r

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 (_c *MockOption_Execute_Call) Run(run func(r *registry)) *MockOption_Execute_Call

func (*MockOption_Execute_Call) RunAndReturn

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

type MockOption_Expecter

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

func (*MockOption_Expecter) Execute

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

Execute is a helper method to define mock.On call

  • r *registry

type MockRegistry

type MockRegistry struct {
	mock.Mock
}

MockRegistry is an autogenerated mock type for the Registry type

func NewMockRegistry

func NewMockRegistry(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockRegistry

NewMockRegistry creates a new instance of MockRegistry. 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 (*MockRegistry) EXPECT

func (_m *MockRegistry) EXPECT() *MockRegistry_Expecter

func (*MockRegistry) Keys

func (_m *MockRegistry) Keys() []string

Keys provides a mock function with given fields:

func (*MockRegistry) Run

func (_m *MockRegistry) Run(ctx context.Context, key string, metadata cycle.Metadata) error

Run provides a mock function with given fields: ctx, key, metadata

func (*MockRegistry) ShouldRun

func (_m *MockRegistry) ShouldRun(key string) bool

ShouldRun provides a mock function with given fields: key

func (*MockRegistry) Stop

func (_m *MockRegistry) Stop()

Stop provides a mock function with given fields:

func (*MockRegistry) Update

func (_m *MockRegistry) Update()

Update provides a mock function with given fields:

type MockRegistry_Expecter

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

func (*MockRegistry_Expecter) Keys

Keys is a helper method to define mock.On call

func (*MockRegistry_Expecter) Run

func (_e *MockRegistry_Expecter) Run(ctx interface{}, key interface{}, metadata interface{}) *MockRegistry_Run_Call

Run is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • metadata cycle.Metadata

func (*MockRegistry_Expecter) ShouldRun

func (_e *MockRegistry_Expecter) ShouldRun(key interface{}) *MockRegistry_ShouldRun_Call

ShouldRun is a helper method to define mock.On call

  • key string

func (*MockRegistry_Expecter) Stop

Stop is a helper method to define mock.On call

func (*MockRegistry_Expecter) Update

Update is a helper method to define mock.On call

type MockRegistry_Keys_Call

type MockRegistry_Keys_Call struct {
	*mock.Call
}

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

func (*MockRegistry_Keys_Call) Return

func (*MockRegistry_Keys_Call) Run

func (_c *MockRegistry_Keys_Call) Run(run func()) *MockRegistry_Keys_Call

func (*MockRegistry_Keys_Call) RunAndReturn

func (_c *MockRegistry_Keys_Call) RunAndReturn(run func() []string) *MockRegistry_Keys_Call

type MockRegistry_Run_Call

type MockRegistry_Run_Call struct {
	*mock.Call
}

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

func (*MockRegistry_Run_Call) Return

func (*MockRegistry_Run_Call) Run

func (_c *MockRegistry_Run_Call) Run(run func(ctx context.Context, key string, metadata cycle.Metadata)) *MockRegistry_Run_Call

func (*MockRegistry_Run_Call) RunAndReturn

type MockRegistry_ShouldRun_Call

type MockRegistry_ShouldRun_Call struct {
	*mock.Call
}

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

func (*MockRegistry_ShouldRun_Call) Return

func (*MockRegistry_ShouldRun_Call) Run

func (*MockRegistry_ShouldRun_Call) RunAndReturn

type MockRegistry_Stop_Call

type MockRegistry_Stop_Call struct {
	*mock.Call
}

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

func (*MockRegistry_Stop_Call) Return

func (*MockRegistry_Stop_Call) Run

func (_c *MockRegistry_Stop_Call) Run(run func()) *MockRegistry_Stop_Call

func (*MockRegistry_Stop_Call) RunAndReturn

func (_c *MockRegistry_Stop_Call) RunAndReturn(run func()) *MockRegistry_Stop_Call

type MockRegistry_Update_Call

type MockRegistry_Update_Call struct {
	*mock.Call
}

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

func (*MockRegistry_Update_Call) Return

func (*MockRegistry_Update_Call) Run

func (*MockRegistry_Update_Call) RunAndReturn

func (_c *MockRegistry_Update_Call) RunAndReturn(run func()) *MockRegistry_Update_Call

type MockUpdaterFunc

type MockUpdaterFunc struct {
	mock.Mock
}

MockUpdaterFunc is an autogenerated mock type for the UpdaterFunc type

func NewMockUpdaterFunc

func NewMockUpdaterFunc(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUpdaterFunc

NewMockUpdaterFunc creates a new instance of MockUpdaterFunc. 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 (*MockUpdaterFunc) EXPECT

func (*MockUpdaterFunc) Execute

func (_m *MockUpdaterFunc) Execute() (FetchersMap, error)

Execute provides a mock function with given fields:

type MockUpdaterFunc_Execute_Call

type MockUpdaterFunc_Execute_Call struct {
	*mock.Call
}

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

func (*MockUpdaterFunc_Execute_Call) Return

func (*MockUpdaterFunc_Execute_Call) Run

func (*MockUpdaterFunc_Execute_Call) RunAndReturn

type MockUpdaterFunc_Expecter

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

func (*MockUpdaterFunc_Expecter) Execute

Execute is a helper method to define mock.On call

type Option

type Option func(r *registry)

func WithFetchersMap

func WithFetchersMap(f FetchersMap) Option

func WithUpdater

func WithUpdater(fn UpdaterFunc) Option

type RegisteredFetcher

type RegisteredFetcher struct {
	Fetcher   fetching.Fetcher
	Condition []fetching.Condition
}

type Registry

type Registry interface {
	Keys() []string
	ShouldRun(key string) bool
	Run(ctx context.Context, key string, metadata cycle.Metadata) error
	Update()
	Stop()
}

func NewRegistry

func NewRegistry(log *logp.Logger, options ...Option) Registry

type UpdaterFunc

type UpdaterFunc func() (FetchersMap, error)

Jump to

Keyboard shortcuts

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