Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
msanft committed Oct 31, 2023
1 parent 785110f commit 9995897
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions hack/logcollector/internal/logstash.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,30 @@ const (

// LogstashPreparer prepares the Logstash Helm chart.
type LogstashPreparer struct {
fh file.Handler
fields map[string]string
username string
password string
port int
fh file.Handler
fields map[string]string
username string
password string
port int
templatePreparer
}

// NewLogstashPreparer returns a new LogstashPreparer.
func NewLogstashPreparer(fields map[string]string, username, password string, port int) *LogstashPreparer {
return &LogstashPreparer{
username: username,
password: password,
fields: fields,
fh: file.NewHandler(afero.NewOsFs()),
port: port,
username: username,
password: password,
fields: fields,
fh: file.NewHandler(afero.NewOsFs()),
port: port,
}
}

// Prepare prepares the Logstash Helm chart by templating the required files and placing them in the specified directory.
func (p *LogstashPreparer) Prepare(dir string) error {
templatedPipelineConf, err := p.template(logstashAssets, "templates/pipeline.conf", pipelineConfTemplate{
InfoMap: p.fields,
Host: openSearchHost,
InfoMap: p.fields,
Host: openSearchHost,
Credentials: Credentials{
Username: p.username,
Password: p.password,
Expand Down

0 comments on commit 9995897

Please sign in to comment.