Skip to content

Commit

Permalink
add docs, fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
fearful-symmetry committed Sep 14, 2023
1 parent afe73e8 commit bbb8072
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions libbeat/esleg/eslegclient/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ func (conn *Connection) getVersion() error {
conn.isServerless = true
} else if versionData.Version.BuildFlavor == "default" {
conn.isServerless = false
// not sure if this is even possible, just being defensive
} else {
conn.log.Infof("Got unexpected build flavor '%s'", versionData.Version.BuildFlavor)
}
Expand Down
7 changes: 4 additions & 3 deletions libbeat/idxmgmt/std.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (s *indexSupport) BuildSelector(cfg *config.C) (outputs.IndexSelector, erro
}
err = selCfg.SetChild("indices", -1, sub)
if err != nil {
return nil, fmt.Errorf("error setting child 'indicies': %w", err)
return nil, fmt.Errorf("error setting child 'indices': %w", err)
}
}

Expand Down Expand Up @@ -270,7 +270,7 @@ func (m *indexManager) Setup(loadTemplate, loadILM LoadMode) error {
tmplCfg.Overwrite, tmplCfg.Enabled = templateComponent.overwrite, templateComponent.enabled

if ilmComponent.enabled {
tmplCfg, err = applyILMSettings(log, tmplCfg, m.support.ilm.Policy())
tmplCfg, err = applyILMSettingsToTemplate(log, tmplCfg, m.support.ilm.Policy())
if err != nil {
return fmt.Errorf("error applying ILM settings: %w", err)
}
Expand Down Expand Up @@ -341,7 +341,8 @@ func unpackTemplateConfig(info beat.Info, cfg *config.C) (config template.Templa
return config, err
}

func applyILMSettings(
// applies the specified ILM policy to the provided template, returns a struct of the template config
func applyILMSettingsToTemplate(
log *logp.Logger,
tmpl template.TemplateConfig,
policy ilm.Policy,
Expand Down

0 comments on commit bbb8072

Please sign in to comment.