Skip to content
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

feat: add -run-once option to exit after a single collection #6537

Closed

Conversation

rawkode
Copy link
Contributor

@rawkode rawkode commented Oct 17, 2019

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Decided to have a pop at #2546

@rawkode rawkode force-pushed the feature/serverless-telegraf branch 2 times, most recently from 3cf5b18 to d0be50c Compare October 18, 2019 12:10
@rawkode
Copy link
Contributor Author

rawkode commented Oct 18, 2019

Managed to clean this up a little more 👍

}

// NewAgent returns an Agent for the given Config.
func NewAgent(config *config.Config) (*Agent, error) {
func NewAgent(config *config.Config, runOnce bool) (*Agent, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation of this isn't something I would accept, adding booleans as trailing parameters is not allowed and it pushes a lot of new complexity into the agent.

The interface to this should be a new function, similar to what was done with the Test function.

Implementation might be shared, but it ought to guarantee a single Gather, single Aggregation, and as many writes are are required to send it all. So, I'm not sure if sharing much would work out.

@danielnelson
Copy link
Contributor

Let's reopen the pull request when we have something closer to what we would merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants