Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignPublicIP ¶
AssignPublicIP assign the publicIP to the interface with the localIP.
func PublicIPv4 ¶
PublicIPv4 returns the public IPv4 address of the requester.
func RewritePublicIP ¶
RewritePublicIP adds iptables rules to rewrite incoming packets with the publicIP and outgoing packets with the localIP. This counteracts cloud "Internet Gateway" NATs.
func SetHostname ¶
func SetHostname(hostname string)
SetHostname sets the node hostname and update the hosts file.
func SetKubeletNodeIP ¶
SetKubeletNodeIP sets the node IP in the kubelet configuration.
Types ¶
type GeoIPResponse ¶
type GeoIPResponse struct {
City string `json:"string"`
CountryCode string `json:"country_code"`
CountryName string `json:"country_name"`
IP net.IP `json:"ip"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
RegionCode string `json:"region_code"`
RegionName string `json:"region_name"`
Timezone string `json:"time_zone"`
}
func GeoIP ¶
func GeoIP() GeoIPResponse
GeoIP returns the geographical location of the requester IP address using an external service.
Click to show internal directories.
Click to hide internal directories.