Documentation ¶
Index ¶
- type Server
- func (s *Server) Initialize(DBHost, DBPort, DBUser, DBPassword, DBDatabase, inverters, telemetries string) error
- func (s *Server) InverterAcquisition(baseURL string, iPeriod int64, quit chan bool)
- func (s *Server) InverterCollectorConfig() error
- func (s *Server) RefreshInverterCollection(ctx context.Context) error
- func (s *Server) RefreshTelemetryDataCollection(ctx context.Context) error
- func (s *Server) Run(appHost, appPort, iPeriod, tPeriod string)
- func (s *Server) SetupInverterCollection(ctx context.Context) error
- func (s *Server) SetupTelemetryDataCollection(ctx context.Context) error
- func (s *Server) TelemetryDataAcquisition(baseURL string, tPeriod int64, quit chan bool)
- func (s *Server) TelemetryDataCollectorConfig() error
- func (s *Server) Terminate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { DB *mongo.Database InverterCollector *colly.Collector TelemetryCollector *colly.Collector InverterPaths []string TelemetryPaths []string }
Server : the base elements that make the service
func (*Server) Initialize ¶
func (s *Server) Initialize(DBHost, DBPort, DBUser, DBPassword, DBDatabase, inverters, telemetries string) error
Initialize : prepares the service to launch
func (*Server) InverterAcquisition ¶
InverterAcquisition : uses the scrapper for acquire inverter data
func (*Server) InverterCollectorConfig ¶
InverterCollectorConfig : configures the inverter data scrapper
func (*Server) RefreshInverterCollection ¶
RefreshInverterCollection : deletes all the inverters in the DB
func (*Server) RefreshTelemetryDataCollection ¶
RefreshTelemetryDataCollection : deletes all the telemetry data in the DB
func (*Server) SetupInverterCollection ¶
SetupInverterCollection : setups the inverter collection with constraints and rules
func (*Server) SetupTelemetryDataCollection ¶
SetupTelemetryDataCollection : setups the telemetry data collection with constraints and rules
func (*Server) TelemetryDataAcquisition ¶
TelemetryDataAcquisition : uses the scrapper for acquire telemetry data
func (*Server) TelemetryDataCollectorConfig ¶
TelemetryDataCollectorConfig : configures the telemetry data scrapper