fqdn

package
v10.294.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find() string

Find returns fqdn. It uses the following algorithm: First of all, it will return the globally set alternative hostname if it has been initialized with previously with `IntializeAlternativeHostname` If this is not set, it will try to determine the hostname, resolve the hostname to an IP, and based on the hostname it will perform a reverse DNS lookup for the IP. The first entry of the reverse DNS lookup will be returned. If there are any errors during this process, this function will return "unknown". It will never return an empty string.

func InitializeAlternativeHostname

func InitializeAlternativeHostname(hostname string)

InitializeAlternativeHostname can be used to set an alternative hostname that is being used by `FindFQDN`. The enforcer can use this during startup to provide an alternative value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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