From 0254e2e22c2f36b02106d40b56b301cb5b11e6cf Mon Sep 17 00:00:00 2001 From: Blake Rouse Date: Thu, 2 Jul 2020 08:28:03 -0400 Subject: [PATCH 1/2] Remove the downloadConfig and retryConfig from plugin/process.Application and plugin/service.Application. --- x-pack/elastic-agent/pkg/core/plugin/process/app.go | 4 ---- x-pack/elastic-agent/pkg/core/plugin/service/app.go | 4 ---- 2 files changed, 8 deletions(-) diff --git a/x-pack/elastic-agent/pkg/core/plugin/process/app.go b/x-pack/elastic-agent/pkg/core/plugin/process/app.go index 7696665bbd0..876220a4ff4 100644 --- a/x-pack/elastic-agent/pkg/core/plugin/process/app.go +++ b/x-pack/elastic-agent/pkg/core/plugin/process/app.go @@ -53,8 +53,6 @@ type Application struct { monitor monitoring.Monitor processConfig *process.Config - downloadConfig *artifact.Config - retryConfig *retry.Config logger *logger.Logger @@ -92,8 +90,6 @@ func NewApplication( spec: spec, srv: srv, processConfig: cfg.ProcessConfig, - downloadConfig: cfg.DownloadConfig, - retryConfig: cfg.RetryConfig, logger: logger, limiter: b, reporter: reporter, diff --git a/x-pack/elastic-agent/pkg/core/plugin/service/app.go b/x-pack/elastic-agent/pkg/core/plugin/service/app.go index d4975d828c6..a3806409611 100644 --- a/x-pack/elastic-agent/pkg/core/plugin/service/app.go +++ b/x-pack/elastic-agent/pkg/core/plugin/service/app.go @@ -56,8 +56,6 @@ type Application struct { monitor monitoring.Monitor processConfig *process.Config - downloadConfig *artifact.Config - retryConfig *retry.Config logger *logger.Logger @@ -96,8 +94,6 @@ func NewApplication( spec: spec, srv: srv, processConfig: cfg.ProcessConfig, - downloadConfig: cfg.DownloadConfig, - retryConfig: cfg.RetryConfig, logger: logger, limiter: b, reporter: reporter, From cf68a053522842bf7867a23dd0a7d6d7ee020913 Mon Sep 17 00:00:00 2001 From: Blake Rouse Date: Mon, 6 Jul 2020 08:42:40 -0400 Subject: [PATCH 2/2] Run mage fmt. --- .../pkg/core/plugin/process/app.go | 32 ++++++++--------- .../pkg/core/plugin/service/app.go | 34 +++++++++---------- 2 files changed, 31 insertions(+), 35 deletions(-) diff --git a/x-pack/elastic-agent/pkg/core/plugin/process/app.go b/x-pack/elastic-agent/pkg/core/plugin/process/app.go index 876220a4ff4..edd5fb950b3 100644 --- a/x-pack/elastic-agent/pkg/core/plugin/process/app.go +++ b/x-pack/elastic-agent/pkg/core/plugin/process/app.go @@ -15,12 +15,10 @@ import ( "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/errors" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation/config" - "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/artifact" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/app" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/logger" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/monitoring" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/process" - "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/retry" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/server" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/state" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/tokenbucket" @@ -52,7 +50,7 @@ type Application struct { monitor monitoring.Monitor - processConfig *process.Config + processConfig *process.Config logger *logger.Logger @@ -82,20 +80,20 @@ func NewApplication( b, _ := tokenbucket.NewTokenBucket(ctx, 3, 3, 1*time.Second) return &Application{ - bgContext: ctx, - id: id, - name: appName, - pipelineID: pipelineID, - logLevel: logLevel, - spec: spec, - srv: srv, - processConfig: cfg.ProcessConfig, - logger: logger, - limiter: b, - reporter: reporter, - monitor: monitor, - uid: uid, - gid: gid, + bgContext: ctx, + id: id, + name: appName, + pipelineID: pipelineID, + logLevel: logLevel, + spec: spec, + srv: srv, + processConfig: cfg.ProcessConfig, + logger: logger, + limiter: b, + reporter: reporter, + monitor: monitor, + uid: uid, + gid: gid, }, nil } diff --git a/x-pack/elastic-agent/pkg/core/plugin/service/app.go b/x-pack/elastic-agent/pkg/core/plugin/service/app.go index a3806409611..b1b52a447b3 100644 --- a/x-pack/elastic-agent/pkg/core/plugin/service/app.go +++ b/x-pack/elastic-agent/pkg/core/plugin/service/app.go @@ -18,12 +18,10 @@ import ( "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/errors" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation/config" - "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/artifact" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/app" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/logger" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/monitoring" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/process" - "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/retry" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/server" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/state" "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/tokenbucket" @@ -55,7 +53,7 @@ type Application struct { monitor monitoring.Monitor - processConfig *process.Config + processConfig *process.Config logger *logger.Logger @@ -86,21 +84,21 @@ func NewApplication( b, _ := tokenbucket.NewTokenBucket(ctx, 3, 3, 1*time.Second) return &Application{ - bgContext: ctx, - id: id, - name: appName, - pipelineID: pipelineID, - logLevel: logLevel, - spec: spec, - srv: srv, - processConfig: cfg.ProcessConfig, - logger: logger, - limiter: b, - reporter: reporter, - monitor: monitor, - uid: uid, - gid: gid, - credsPort: credsPort, + bgContext: ctx, + id: id, + name: appName, + pipelineID: pipelineID, + logLevel: logLevel, + spec: spec, + srv: srv, + processConfig: cfg.ProcessConfig, + logger: logger, + limiter: b, + reporter: reporter, + monitor: monitor, + uid: uid, + gid: gid, + credsPort: credsPort, }, nil }