poller

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLocationExists = fmt.Errorf("location already exists")

ErrLocationExists is the error returned by AddLocation when the location is already being polled.

Functions

This section is empty.

Types

type Client

type Client interface {
	// AddLocation creates a new forecast poll job for the given location.
	AddLocation(ctx context.Context, city, state string) error

	// Subscribe subscribes to the poller service events.
	// Cancel the context to unsubscribe and return.
	Subscribe(ctx context.Context, city, state string) (<-chan *genpoller.Forecast, error)
}

Client is the poller client interface.

func New

func New(scheme, host string, httpc *http.Client) Client

New returns a new forecast poller client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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