flyutil

package
v1.1.64 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package flyutil provides utilities for Fly.io runtime environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocID

func AllocID() string

AllocID returns Fly.io allocation ID or empty string if the app is not running in the cloud.

func AppName

func AppName() string

AppName returns Fly.io app name or empty string if the app is not running in the cloud.

func EnvironmentSlug added in v1.1.8

func EnvironmentSlug() string

EnvironmentSlug returns a slug name of the environment ("${FLY_REGION}-${ENVIRONMENT}").

func GetAppAddress added in v1.1.6

func GetAppAddress(appName string) string

GetAppAddress returns an address pointing to one of the app instances.

func GetAppAddressInRegion added in v1.1.6

func GetAppAddressInRegion(appName, region string) string

GetAppAddressInRegion returns an address pointing to one of the app instances in given region.

func Region

func Region() string

Region returns Fly.io region name or empty string if the app is not running in the cloud.

func ResolveAppAddressInRegion

func ResolveAppAddressInRegion(appName, region string) (net.IP, error)

ResolveAppAddressInRegion resolves an address of the closest instance of the given app in given region.

func ResolveAppAddresses

func ResolveAppAddresses(appName string) ([]net.IP, error)

ResolveAppAddresses returns a list of IPv6 addresses belonging to the given app.

func ResolveAppAddressesInRegion

func ResolveAppAddressesInRegion(appName, region string) ([]net.IP, error)

ResolveAppAddressesInRegion returns a list of IPv6 addresses belonging to the given app in given region.

func ResolveAppNames

func ResolveAppNames() ([]string, error)

ResolveAppNames returns a list of names of all apps running in the current organisation.

func ResolveAppNearestAddresses

func ResolveAppNearestAddresses(appName string, n int) ([]net.IP, error)

ResolveAppNearestAddresses returns a list of N nearest IPv6 addresses belonging to the given app.

func ResolveAppRegions

func ResolveAppRegions(appName string) ([]string, error)

ResolveAppRegions returns a list of regions where given app is deployed.

func ResolveAppVMs

func ResolveAppVMs(appName string) ([]string, error)

ResolveAppVMs returns a list of alloc IDs of all instances that belong to the given app.

func ResolveInstanceAddress

func ResolveInstanceAddress(appName, allocID string) (net.IP, error)

ResolveInstanceAddress returns an IPv6 of given app instance.

func ResolveNearestAppAddress

func ResolveNearestAppAddress(appName string) (net.IP, error)

ResolveNearestAppAddress resolves an address of the closest instance of the given app.

func ResolveWireguardPeerAddress

func ResolveWireguardPeerAddress(peer string) (net.IP, error)

ResolveWireguardPeerAddress returns an IPv6 of the given Wireguard peer.

func ResolveWireguardPeers

func ResolveWireguardPeers() ([]string, error)

ResolveWireguardPeers returns a list of all Wireguard peers deployed in the private network.

func RunningInCloud

func RunningInCloud() bool

RunningInCloud checks whether the process is currently running inside Fly.io run environment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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