flycast

command module
v0.0.1-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 11 Imported by: 0

README

Build Status Coverage Report

flycast

flycast implements persevering UDP broadcasting for apps running on Fly.

It does so by accepting UDP packets on two configurable port numbers and by re-sending those packets to global or regional (depending on the intercepting port) instances of a configurable target app via the organization's internal network.

flycast discovers the instances it should broadcast to automatically, via querying Fly's internal DNS, and very frequently (currently every second) and comes with an embedded HTTP server that exports a complete health check.

An example deployment configuration can be found in the fly.example.toml file of this repo.

Disclaimer

  • This here program works not, maybe possibly, yet.
  • 16384 bytes, or 16 KiB, is the maximum UDP packet size flycast can handle.

Configuration

flycast is configured via the following environment variables:

Variable Description Default value
$APP Fly app to broadcast to. $FLY_APP_NAME
$PORT_GLOBAL Packets arriving on this port will be broadcasted to all instances of $APP. 65535
$PORT_LOCAL Packets arriving on this port will be broadcasted to instances of $APP in the same region they were intercepted in. 65534
$PORT_RELAY flycast will broadcast packets to this port. 65533
$PORT_HTTP The embedded web browser will run on this port with the health check accessible under /health. 8080
$LOG_LEVEL Controls the verbosity of the logger. Valid values are debug, info, warn, error. info
$LOG_FORMAT When set to json instructs the logger to output JSON objects instead of raw text. N/A

Documentation

Overview

flycast implements UDP broadcasting on fly.io.

Directories

Path Synopsis
internal
app
Package app implements the application layer.
Package app implements the application layer.
common
Package common implements functionality consumed by other packages.
Package common implements functionality consumed by other packages.
config
Package config implements the configuration loader.
Package config implements the configuration loader.
log
Package log implements logging functionality.
Package log implements logging functionality.
loop
Package loop implements a persevering func runner.
Package loop implements a persevering func runner.
wire
Package wire implements the network level.
Package wire implements the network level.

Jump to

Keyboard shortcuts

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