Documentation
¶
Overview ¶
Package dns implements functionality for when dealing with fly's internal DNS.
Index ¶
- func Apps(ctx context.Context) ([]string, error)
- func Instances(ctx context.Context, appName, region string) ([]net.IP, error)
- func Peer(ctx context.Context, name string) (net.IP, error)
- func Peers(ctx context.Context) ([]string, error)
- func PrivateIP(ctx context.Context) (net.IP, error)
- func Regions(ctx context.Context, appName string) ([]string, error)
- type DNS
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Instances ¶
Instances returns the IPv6 addresses for all of the instances of the named application in the given region.
Should the given region be empty, Instances returns all of the instances of the named application.
Types ¶
type DNS ¶
type DNS interface { // Regions returns the regions the named application is deployed to. Regions(ctx context.Context, appName string) ([]string, error) // Instances returns the IPv6 addresses for the instances of the // named application in the given region. // // Should the given region be empty, Instances returns all of the instances // of the named application. Instances(ctx context.Context, appName, region string) ([]net.IP, error) // Apps returns the applications running in the current organization. Apps(ctx context.Context) ([]string, error) // Peers returns the names of all wireguard peers. Peers(ctx context.Context) ([]string, error) // Peer returns the IPv6 address of the named wireguard peer. Peer(ctx context.Context, name string) (net.IP, error) // PrivateIP returns the IPv6 address of the local instance. PrivateIP(ctx context.Context) (net.IP, error) }
DNS wraps the functionality the .internal addresses of fly provide.
type Resolver ¶
type Resolver interface { // LookupTXT returns the DNS TXT records for the given domain name. LookupTXT(ctx context.Context, name string) ([]string, error) // LookupIP looks up host for the given network. It returns a slice of that // host's IP addresses of the type specified by network. network must be one // of "ip", "ip4" or "ip6". LookupIP(ctx context.Context, network, host string) ([]net.IP, error) }
Resolver wraps the functionality that instances of DNS rely on.
All instances of net.Resolver implement Resolver.
Click to show internal directories.
Click to hide internal directories.