forecaster

package
v0.0.8-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is the forecast service implementation.

func New

func New(ctx context.Context, pollerc poller.Client, rdb *redis.Client) *Service

New instantiates a new forecast service.

func (*Service) Forecast

Forecast returns the forecast for the given location. It uses the forecasts replicated map as a transparent cache. If the forecast is not in the cache then it creates a new poll job using the poller service and waits for the forecast to be available in the map.

func (*Service) Stop

func (svc *Service) Stop() error

Stop stops the service gracefully.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL