orderwatcher

package
v0.0.0-...-f7a92a3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: MIT Imports: 17 Imported by: 0

README

orderwatcher GoDoc

Package orderwatcher contains the watchdog and state distribution system, and thus handles most of the fault tolerance in the elevator system.

Download:

go get github.com/sigtot/sanntid/orderwatcher

Package orderwatcher contains the watchdog and state distribution system, and thus handles most of the fault tolerance in the elevator system. Orders on the network are stored in a local database, which is regularly distributed and synced with the other elevators on the network.


Automatically generated by autoreadme on 2019.04.01

Documentation

Overview

Package orderwatcher contains the watchdog and state distribution system, and thus handles most of the fault tolerance in the elevator system. Orders on the network are stored in a local database, which is regularly distributed and synced with the other elevators on the network.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartDbDistributor

func StartDbDistributor(db *bolt.DB, dbName string, quit <-chan int) chan int

StartDbDistributor starts distributing the database of orders. It compresses the file and publishes it as a DbMsg on the network.

func StartOrderWatcher

func StartOrderWatcher(callsForSale chan types.Call, db *bolt.DB, quit <-chan int, wg *sync.WaitGroup)

StartOrderWatcher starts the order watcher, which listens for call sales and order deliveries on the network, and updates a local database that stores all orders. It traverses the database at regular intervals and sends orders that take too long to deliver to the seller. The order watcher also listens for database files sent by the other db distributors and synchronizes them with the local database. An order watcher subscribes to sale acknowledgements, order deliveries and db distribution messages.

Types

This section is empty.

Jump to

Keyboard shortcuts

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