-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create TCS Handler in ecs-agent model #3731
Conversation
17d496a
to
f5afe41
Compare
ba77fbf
to
fce302e
Compare
1440596
to
8809c11
Compare
@@ -37,7 +37,6 @@ type TelemetrySessionParams struct { | |||
CredentialProvider *credentials.Credentials | |||
Cfg *config.Config | |||
DeregisterInstanceEventStream *eventstream.EventStream | |||
AcceptInvalidCert bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed because this parameter is not used. Cfg.AcceptInsecureCert
is used instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
return | ||
} | ||
go statsEngine.StartMetricsPublish() | ||
|
||
telemetrySessionParams := tcshandler.TelemetrySessionParams{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed it before, but why are we still using the old handler instead of the new shared one in ecs-agent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Looks like there is a PR open yet to be merged. Will wait for it.
Summary
Create TCS Handler in ecs-agent module and corresponding agent component to integrate with this change. Also add some tests to TCS Client and TCS Handler in ecs-agent module.
Implementation details
ecs-agent/tcs/handler
TelemetrySession
interface and an implementationecs-agent/tcs/client
stats/reporter
agent/tcs/handler
discoverTelemetryEndpoint
API. This was originally inagent/tcs/handler
ecs-agent/tcs/handler
'sTelemetrySession
interface to "override"Start
function, so thatdiscoverPollEndpoint
can also be part of the retry and backoff, while avoiding moving too many code (some of those are agent module specific) to ecs-agent moduleA follow up PR will remove the
agent/tcs/handler
as well as wire in the new TCS Handler (use session definition in reporter inagent.go
)Testing
New tests cover the changes: yes
Description for the changelog
Create TCS Handler in ecs-agent model
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.