all to pkg
This commit is contained in:
		
							parent
							
								
									06594f67eb
								
							
						
					
					
						commit
						1900e69d7a
					
				
							
								
								
									
										2
									
								
								main.go
								
								
								
								
							
							
						
						
									
										2
									
								
								main.go
								
								
								
								
							|  | @ -6,7 +6,7 @@ import ( | ||||||
| 	"os" | 	"os" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| 	// Load input plugins!
 | 	// Load input plugins!
 | ||||||
| 	_ "github.com/unpoller/unpoller/pkg/inputunifi" | 	_ "github.com/unpoller/unpoller/pkg/inputunifi" | ||||||
| 	// Load output plugins!
 | 	// Load output plugins!
 | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ import ( | ||||||
| 
 | 
 | ||||||
| 	"github.com/DataDog/datadog-go/statsd" | 	"github.com/DataDog/datadog-go/statsd" | ||||||
| 	"github.com/unpoller/unifi" | 	"github.com/unpoller/unifi" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| 	"golift.io/cnfg" | 	"golift.io/cnfg" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ import ( | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/DataDog/datadog-go/statsd" | 	"github.com/DataDog/datadog-go/statsd" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Report is a will report the current collection run data.
 | // Report is a will report the current collection run data.
 | ||||||
|  |  | ||||||
|  | @ -13,8 +13,8 @@ import ( | ||||||
| 
 | 
 | ||||||
| 	influx "github.com/influxdata/influxdb1-client/v2" | 	influx "github.com/influxdata/influxdb1-client/v2" | ||||||
| 	"github.com/unpoller/unifi" | 	"github.com/unpoller/unifi" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| 	"github.com/unpoller/unpoller/core/webserver" | 	"github.com/unpoller/unpoller/pkg/webserver" | ||||||
| 	"golift.io/cnfg" | 	"golift.io/cnfg" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unpoller/core/webserver" | 	"github.com/unpoller/unpoller/pkg/webserver" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Logf logs a message.
 | // Logf logs a message.
 | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ import ( | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	influx "github.com/influxdata/influxdb1-client/v2" | 	influx "github.com/influxdata/influxdb1-client/v2" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Report is returned to the calling procedure after everything is processed.
 | // Report is returned to the calling procedure after everything is processed.
 | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ import ( | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unifi" | 	"github.com/unpoller/unifi" | ||||||
| 	"github.com/unpoller/unpoller/core/webserver" | 	"github.com/unpoller/unpoller/pkg/webserver" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| /* Event collection. Events are also sent to the webserver for display. */ | /* Event collection. Events are also sent to the webserver for display. */ | ||||||
|  |  | ||||||
|  | @ -8,7 +8,7 @@ import ( | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unifi" | 	"github.com/unpoller/unifi" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| var ErrScrapeFilterMatchFailed = fmt.Errorf("scrape filter match failed, and filter is not http URL") | var ErrScrapeFilterMatchFailed = fmt.Errorf("scrape filter match failed, and filter is not http URL") | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ import ( | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unifi" | 	"github.com/unpoller/unifi" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // PluginName is the name of this input plugin.
 | // PluginName is the name of this input plugin.
 | ||||||
|  |  | ||||||
|  | @ -7,8 +7,8 @@ import ( | ||||||
| 	"strings" | 	"strings" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unifi" | 	"github.com/unpoller/unifi" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| 	"github.com/unpoller/unpoller/core/webserver" | 	"github.com/unpoller/unpoller/pkg/webserver" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| var ( | var ( | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ import ( | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unifi" | 	"github.com/unpoller/unifi" | ||||||
| 	"github.com/unpoller/unpoller/core/webserver" | 	"github.com/unpoller/unpoller/pkg/webserver" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| /* This code reformats our data to be displayed on the built-in web interface. */ | /* This code reformats our data to be displayed on the built-in web interface. */ | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unpoller/core/webserver" | 	"github.com/unpoller/unpoller/pkg/webserver" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Logf logs a message.
 | // Logf logs a message.
 | ||||||
|  |  | ||||||
|  | @ -7,8 +7,8 @@ import ( | ||||||
| 	"strings" | 	"strings" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| 	"github.com/unpoller/unpoller/core/webserver" | 	"github.com/unpoller/unpoller/pkg/webserver" | ||||||
| 	"golift.io/cnfg" | 	"golift.io/cnfg" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ import ( | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unifi" | 	"github.com/unpoller/unifi" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // LogStream contains a stream of logs (like a log file).
 | // LogStream contains a stream of logs (like a log file).
 | ||||||
|  |  | ||||||
|  | @ -3,7 +3,7 @@ package main | ||||||
| import ( | import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| 	"golift.io/cnfg" | 	"golift.io/cnfg" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -13,8 +13,8 @@ import ( | ||||||
| 	"github.com/prometheus/client_golang/prometheus/promhttp" | 	"github.com/prometheus/client_golang/prometheus/promhttp" | ||||||
| 	promver "github.com/prometheus/common/version" | 	promver "github.com/prometheus/common/version" | ||||||
| 	"github.com/unpoller/unifi" | 	"github.com/unpoller/unifi" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| 	"github.com/unpoller/unpoller/core/webserver" | 	"github.com/unpoller/unpoller/pkg/webserver" | ||||||
| 	"golift.io/version" | 	"golift.io/version" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unpoller/core/webserver" | 	"github.com/unpoller/unpoller/pkg/webserver" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // Logf logs a message.
 | // Logf logs a message.
 | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ import ( | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/prometheus/client_golang/prometheus" | 	"github.com/prometheus/client_golang/prometheus" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // This file contains the report interface.
 | // This file contains the report interface.
 | ||||||
|  |  | ||||||
|  | @ -11,7 +11,7 @@ import ( | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/gorilla/mux" | 	"github.com/gorilla/mux" | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| 	"golang.org/x/crypto/bcrypt" | 	"golang.org/x/crypto/bcrypt" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
|  | @ -7,7 +7,7 @@ import ( | ||||||
| 	"net/http" | 	"net/http" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
| 	"github.com/unpoller/unpoller/core/poller" | 	"github.com/unpoller/unpoller/pkg/poller" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| /* This file has the methods that help the content-methods. Shared helpers. */ | /* This file has the methods that help the content-methods. Shared helpers. */ | ||||||
		Loading…
	
		Reference in New Issue