minor shuffle

This commit is contained in:
davidnewhall2 2020-06-25 22:26:45 -07:00
parent 7ac82f6e9c
commit bccf9401d1
2 changed files with 8 additions and 8 deletions

View File

@ -76,12 +76,12 @@ func (c *Client) NewRequest(url, method, cType string, msg []byte) (*http.Reques
req.Header.Set("Content-Type", cType) req.Header.Set("Content-Type", cType)
} }
if c.Config.Username != "" || c.Config.Password != "" { if c.Username != "" || c.Password != "" {
req.SetBasicAuth(c.Config.Username, c.Config.Password) req.SetBasicAuth(c.Username, c.Password)
} }
if c.Config.TenantID != "" { if c.TenantID != "" {
req.Header.Set("X-Scope-OrgID", c.Config.TenantID) req.Header.Set("X-Scope-OrgID", c.TenantID)
} }
return req, nil return req, nil

View File

@ -23,19 +23,19 @@ type Logs struct {
// Report is the temporary data generated by processing events. // Report is the temporary data generated by processing events.
type Report struct { type Report struct {
Counts map[string]int
Oldest time.Time
Start time.Time Start time.Time
Oldest time.Time
poller.Logger poller.Logger
Counts map[string]int
} }
// NewReport makes a new report. // NewReport makes a new report.
func (l *Loki) NewReport(start time.Time) *Report { func (l *Loki) NewReport(start time.Time) *Report {
return &Report{ return &Report{
Counts: make(map[string]int),
Oldest: l.last,
Start: start, Start: start,
Oldest: l.last,
Logger: l.Collect, Logger: l.Collect,
Counts: make(map[string]int),
} }
} }