Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Verbose bool
Functions ¶
func ExcludeDisallowedIps ¶
ExcludeDisallowedIps is a function that expects two slices of a network values, e.g. [127.0.0.0/8,], where disallowed is a slice of networks to be excluded from the allowed slice. Returns a new slice of networks formed out of the allowed slice without networks of disallowed slice.
func GetActiveSshClients ¶
GetActiveSshClientIps is a function that calls the "who" shell command to get active ssh sessions. Then it extracts all the IP addresses from the command output and converts them into networks using ip2Net for a compability with Wiregaurd configuration format. Returns a slice of networks representing the public networks of active ssh clients.
func GetHttpClient ¶
GetHttpClient is a factory function to get http client with provided retries number.
func GetLocalTimezone ¶
func HumanizeDuration ¶
humanizeDuration humanizes time.Duration output to a meaningful value, golang's default “time.Duration“ output is badly formatted and unreadable.
Types ¶
This section is empty.