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

Align kibana index generation to beats standard. #5290

Merged
merged 2 commits into from
Oct 2, 2017

Conversation

simitt
Copy link
Contributor

@simitt simitt commented Oct 2, 2017

  • Move generator script to dev-tools.
  • Add NewGenerator method which returns struct instead of init method.

@simitt simitt added the review label Oct 2, 2017
@simitt simitt requested a review from ruflin October 2, 2017 15:06
Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

LGTM

func (i *Index) Create() ([]string, error) {
indices := []string{}
// Create an instance of the Kibana Index Pattern Generator
func NewGenerator(indexName, beatName, beatDir, version string) (IndexPatternGenerator, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We normally return a reference here, this also make it possible to return nil, err on line 28.

keys common.MapStr
}

func NewTransformer(timeFieldName, title string, fields common.Fields) Transformer {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above that we could return a reference. Didn't check if it is required in this case. It seems to work just fine :-)

@simitt simitt force-pushed the refactor-generator branch from ab64950 to fcfe481 Compare October 2, 2017 15:18
Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

WFG

* Move generator script to dev-tools.
* Add NewGenerator method which returns struct instead of init method.
@simitt simitt force-pushed the refactor-generator branch from fcfe481 to 286399b Compare October 2, 2017 16:39
@ruflin ruflin merged commit ffca490 into elastic:master Oct 2, 2017
@simitt simitt deleted the refactor-generator branch October 3, 2017 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants