Skip to content

Commit bc84d36

Browse files
Add missing files
Signed-off-by: Patryk Matyjasek <pmatyjasek@sumologic.com>
1 parent eefa4e9 commit bc84d36

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

component/componenttest/nop_extension.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (f *nopExtensionFactory) CreateDefaultConfig() config.Extension {
5151
// CreateExtension implements component.ExtensionFactory interface.
5252
func (f *nopExtensionFactory) CreateExtension(
5353
_ context.Context,
54-
_ component.ExtensionCreateParams,
54+
_ component.ExtensionCreateSettings,
5555
_ config.Extension,
5656
) (component.Extension, error) {
5757
return nopExtensionInstance, nil

component/componenttest/nop_extension_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestNewNopExtensionFactory(t *testing.T) {
3232
cfg := factory.CreateDefaultConfig()
3333
assert.Equal(t, &nopExtensionConfig{ExtensionSettings: config.NewExtensionSettings(config.NewID("nop"))}, cfg)
3434

35-
traces, err := factory.CreateExtension(context.Background(), component.ExtensionCreateParams{}, cfg)
35+
traces, err := factory.CreateExtension(context.Background(), component.ExtensionCreateSettings{}, cfg)
3636
require.NoError(t, err)
3737
assert.NoError(t, traces.Start(context.Background(), NewNopHost()))
3838
assert.NoError(t, traces.Shutdown(context.Background()))

component/extension.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type PipelineWatcher interface {
4646
NotReady() error
4747
}
4848

49-
// ExtensionCreateParams is passed to ExtensionFactory.Create* functions.
49+
// ExtensionCreateSettings is passed to ExtensionFactory.Create* functions.
5050
type ExtensionCreateSettings struct {
5151
// Logger that the factory can use during creation and can pass to the created
5252
// component to be used later as well.

config/configcheck/configcheck_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,6 @@ func (b badConfigExtensionFactory) CreateDefaultConfig() config.Extension {
198198
}{}
199199
}
200200

201-
func (b badConfigExtensionFactory) CreateExtension(_ context.Context, _ component.ExtensionCreateParams, _ config.Extension) (component.Extension, error) {
201+
func (b badConfigExtensionFactory) CreateExtension(_ context.Context, _ component.ExtensionCreateSettings, _ config.Extension) (component.Extension, error) {
202202
return nil, nil
203203
}

internal/testcomponents/example_extension.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ func createExtensionDefaultConfig() config.Extension {
4848
}
4949

5050
// CreateExtension creates an Extension based on this config.
51-
func createExtension(context.Context, component.ExtensionCreateParams, config.Extension) (component.Extension, error) {
51+
func createExtension(context.Context, component.ExtensionCreateSettings, config.Extension) (component.Extension, error) {
5252
return componenthelper.New(), nil
5353
}

service/defaultcomponents/default_extensions_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ type getExtensionConfigFn func() config.Extension
9595
func verifyExtensionLifecycle(t *testing.T, factory component.ExtensionFactory, getConfigFn getExtensionConfigFn) {
9696
ctx := context.Background()
9797
host := newAssertNoErrorHost(t)
98-
extCreateParams := component.ExtensionCreateParams{
98+
extCreateSet := component.ExtensionCreateSettings{
9999
Logger: zap.NewNop(),
100100
BuildInfo: component.DefaultBuildInfo(),
101101
}
@@ -104,12 +104,12 @@ func verifyExtensionLifecycle(t *testing.T, factory component.ExtensionFactory,
104104
getConfigFn = factory.CreateDefaultConfig
105105
}
106106

107-
firstExt, err := factory.CreateExtension(ctx, extCreateParams, getConfigFn())
107+
firstExt, err := factory.CreateExtension(ctx, extCreateSet, getConfigFn())
108108
require.NoError(t, err)
109109
require.NoError(t, firstExt.Start(ctx, host))
110110
require.NoError(t, firstExt.Shutdown(ctx))
111111

112-
secondExt, err := factory.CreateExtension(ctx, extCreateParams, getConfigFn())
112+
secondExt, err := factory.CreateExtension(ctx, extCreateSet, getConfigFn())
113113
require.NoError(t, err)
114114
require.NoError(t, secondExt.Start(ctx, host))
115115
require.NoError(t, secondExt.Shutdown(ctx))

0 commit comments

Comments
 (0)