ref

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package ref contains some reference lookups, implemented as singletons

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AirframeCache

type AirframeCache struct {
	Map map[string]*fdb.Airframe
}

We build a big map, from Icao24 ADS-B Mode-S identifiers, to static data about the physical airframe that is flying. This is built up over time.

func BlankAirframeCache

func BlankAirframeCache() AirframeCache

func (*AirframeCache) Get

func (ac *AirframeCache) Get(id string) *fdb.Airframe

func (*AirframeCache) SaveAirframeCache

func (ac *AirframeCache) SaveAirframeCache(ctx context.Context, sp singleton.SingletonProvider) error

func (*AirframeCache) Set

func (ac *AirframeCache) Set(af *fdb.Airframe)

func (AirframeCache) String

func (ac AirframeCache) String() string

type ScheduleCache

type ScheduleCache struct {
	LastUpdated time.Time
	Map         map[string]*fdb.FlightSnapshot
}

Keep a snapshot of the IcaoId -> Schedule mapping info in memcache.

func BlankScheduleCache

func BlankScheduleCache() ScheduleCache

func (*ScheduleCache) Get

func (ac *ScheduleCache) Get(id string) *fdb.FlightSnapshot

func (*ScheduleCache) SaveScheduleCache

func (sc *ScheduleCache) SaveScheduleCache(ctx context.Context, sp singleton.SingletonProvider) error

func (ScheduleCache) String

func (ac ScheduleCache) String() string

Jump to

Keyboard shortcuts

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