minor shuffle
This commit is contained in:
		
							parent
							
								
									7ac82f6e9c
								
							
						
					
					
						commit
						bccf9401d1
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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),
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue