metar

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CycleWorkers

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

CycleWorkers groups and controls the 24 needed cycle workers instances

func InitWorkers

func InitWorkers(feeder *Feeder) *CycleWorkers

InitWorkers creates, initializes and groups the 24 different METAR cycle workers

func (*CycleWorkers) Start

func (workers *CycleWorkers) Start()

Start starts all cycle workers

func (*CycleWorkers) Stop

func (workers *CycleWorkers) Stop()

Stop stops all cycle workers

type Feeder

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

Feeder represents the worker queueing and feeding new METARs assembled by the cycle workers

func NewFeeder

func NewFeeder(apiClient *client.Client, batchSize int, interval time.Duration) *Feeder

NewFeeder creates a new METAR feeder

func (*Feeder) Queue

func (feeder *Feeder) Queue(metars []string)

Queue queues METARs to feed and fixes them beforehand

func (*Feeder) Start

func (feeder *Feeder) Start() error

Start starts the feeding task

func (*Feeder) Stop

func (feeder *Feeder) Stop() error

Stop stops the feeding task

Jump to

Keyboard shortcuts

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