Documentation ¶
Index ¶
Constants ¶
View Source
const ( GUARD_BEGIN = "# Begin host entries managed by kops - do not edit" GUARD_END = "# End host entries managed by kops" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HostMap ¶ added in v1.23.0
type HostMap struct {
// contains filtered or unexported fields
}
HostMap holds a set of host to address mappings, a simplification of /etc/hosts.
func (*HostMap) Parse ¶ added in v1.23.0
ParseHostMap parses lines from /etc/hosts (expected to be our guarded block) into a HostMap structure. It parses as much as it can, and returns invalid lines (which should ideally be empty)
func (*HostMap) ReplaceRecords ¶ added in v1.23.0
ReplaceRecords replaces all the addresses for the given hostname.
Click to show internal directories.
Click to hide internal directories.