From bccf9401d1169891a2b233da8123089ce409f43e Mon Sep 17 00:00:00 2001 From: davidnewhall2 Date: Thu, 25 Jun 2020 22:26:45 -0700 Subject: [PATCH] minor shuffle --- integrations/lokiunifi/client.go | 8 ++++---- integrations/lokiunifi/report.go | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/integrations/lokiunifi/client.go b/integrations/lokiunifi/client.go index 4672faa7..1d1664b0 100644 --- a/integrations/lokiunifi/client.go +++ b/integrations/lokiunifi/client.go @@ -76,12 +76,12 @@ func (c *Client) NewRequest(url, method, cType string, msg []byte) (*http.Reques req.Header.Set("Content-Type", cType) } - if c.Config.Username != "" || c.Config.Password != "" { - req.SetBasicAuth(c.Config.Username, c.Config.Password) + if c.Username != "" || c.Password != "" { + req.SetBasicAuth(c.Username, c.Password) } - if c.Config.TenantID != "" { - req.Header.Set("X-Scope-OrgID", c.Config.TenantID) + if c.TenantID != "" { + req.Header.Set("X-Scope-OrgID", c.TenantID) } return req, nil diff --git a/integrations/lokiunifi/report.go b/integrations/lokiunifi/report.go index a0b622e0..f0b4446c 100644 --- a/integrations/lokiunifi/report.go +++ b/integrations/lokiunifi/report.go @@ -23,19 +23,19 @@ type Logs struct { // Report is the temporary data generated by processing events. type Report struct { - Counts map[string]int - Oldest time.Time Start time.Time + Oldest time.Time poller.Logger + Counts map[string]int } // NewReport makes a new report. func (l *Loki) NewReport(start time.Time) *Report { return &Report{ - Counts: make(map[string]int), - Oldest: l.last, Start: start, + Oldest: l.last, Logger: l.Collect, + Counts: make(map[string]int), } }