Skip to content

Commit 2aa2886

Browse files
Update changelog
Fix Windows building Signed-off-by: Patryk Matyjasek <[email protected]>
1 parent ee1079e commit 2aa2886

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
- Change `With*Unmarshallers` signatures in Kafka exporter/receiver (#2973)
1010
- Rename `marshall` to `marshal` in all the occurrences (#2977)
11+
- Rename `service.Parameters` to `service.Settings` (#2650)
12+
- Rename `component.ExporterCreateParams`, `component.ExtensionCreateParams`, `component.ProcessorCreateParams`, `component.ReceiverCreateParams` to `component.ComponentSettings` (#2650)
1113

1214
## 💡 Enhancements 💡
1315

cmd/otelcol/main_windows.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ import (
2525
"go.opentelemetry.io/collector/service"
2626
)
2727

28-
func run(params service.Parameters) error {
28+
func run(settings service.Settings) error {
2929
if useInteractiveMode, err := checkUseInteractiveMode(); err != nil {
3030
return err
3131
} else if useInteractiveMode {
32-
return runInteractive(params)
32+
return runInteractive(settings)
3333
} else {
34-
return runService(params)
34+
return runService(settings)
3535
}
3636
}
3737

@@ -51,9 +51,9 @@ func checkUseInteractiveMode() (bool, error) {
5151
}
5252
}
5353

54-
func runService(params service.Parameters) error {
54+
func runService(settings service.Settings) error {
5555
// do not need to supply service name when startup is invoked through Service Control Manager directly
56-
if err := svc.Run("", service.NewWindowsService(params)); err != nil {
56+
if err := svc.Run("", service.NewWindowsService(settings)); err != nil {
5757
return fmt.Errorf("failed to start service %w", err)
5858
}
5959

service/application_windows.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ import (
2727
)
2828

2929
type WindowsService struct {
30-
params Parameters
31-
app *Application
30+
settings Settings
31+
app *Application
3232
}
3333

34-
func NewWindowsService(params Parameters) *WindowsService {
35-
return &WindowsService{params: params}
34+
func NewWindowsService(settings Settings) *WindowsService {
35+
return &WindowsService{settings: settings}
3636
}
3737

3838
// Execute implements https://godoc.org/golang.org/x/sys/windows/svc#Handler
@@ -81,7 +81,7 @@ func (s *WindowsService) Execute(args []string, requests <-chan svc.ChangeReques
8181

8282
func (s *WindowsService) start(elog *eventlog.Log, appErrorChannel chan error) error {
8383
var err error
84-
s.app, err = newWithEventViewerLoggingHook(s.params, elog)
84+
s.app, err = newWithEventViewerLoggingHook(s.settings, elog)
8585
if err != nil {
8686
return err
8787
}
@@ -120,9 +120,9 @@ func openEventLog(serviceName string) (*eventlog.Log, error) {
120120
return elog, nil
121121
}
122122

123-
func newWithEventViewerLoggingHook(params Parameters, elog *eventlog.Log) (*Application, error) {
124-
params.LoggingOptions = append(
125-
params.LoggingOptions,
123+
func newWithEventViewerLoggingHook(settings Settings, elog *eventlog.Log) (*Application, error) {
124+
settings.LoggingOptions = append(
125+
settings.LoggingOptions,
126126
zap.Hooks(func(entry zapcore.Entry) error {
127127
msg := fmt.Sprintf("%v\r\n\r\nStack Trace:\r\n%v", entry.Message, entry.Stack)
128128

@@ -143,5 +143,5 @@ func newWithEventViewerLoggingHook(params Parameters, elog *eventlog.Log) (*Appl
143143
}),
144144
)
145145

146-
return New(params)
146+
return New(settings)
147147
}

0 commit comments

Comments
 (0)