Documentation
¶
Overview ¶
Package hesiod provides a Go hesiod protocol implementation.
Hesiod is a DNS-based directory service developed at MIT for Project Athena. The Go implementation provides a significantly simplified API than the C library.
More information about Hesiod is available from the USENIX paper available from
ftp://athena-dist.mit.edu/pub/ATHENA/usenix/hesiod.PS
Index ¶
Constants ¶
const DefaultHesiodConfigFile = "/etc/hesiod.conf"
DefaultHesiodConfigFile is a path to the systemd-wide hesiod.conf file. On UNIX-like systems, this should be /etc/hesiod.conf.
Variables ¶
var AthenaConfig = &Config{
Nameserver: ".ns",
Realm: ".athena.mit.edu",
}
AthenaConfig is the default configuration for Hesiod, for use at MIT.
Functions ¶
This section is empty.
Types ¶
type Config ¶
A Config contains the Hesiod name server prefix as well as the realm suffix. See AthenaConfig for an example of a typical configuration.
type Hesiod ¶
type Hesiod struct {
// contains filtered or unexported fields
}
The Hesiod service itself.
func NewHesiod ¶
func NewHesiod() *Hesiod
NewHesiod initializes a Hesiod resolver with the machine's local Hesiod configuration.
func NewHesiodWithConfig ¶
NewHesiodWithConfig allows the application to override the machine's local Hesiod configuration with the specified configuration. In the C Hesiod library, this was controlled through the HESIOD_CONFIG environment variable, which is intentionally unsupported in hesiod-go.
func (*Hesiod) GetServiceByName ¶
func (hesiod *Hesiod) GetServiceByName(service string, proto string) (result ServiceEntry, err error)
GetServiceByName queries Hesiod for the service information (protocol, port).
type ServiceEntry ¶
ServiceEntry contains the information similar to getservbyname(3) method, and is used by GetServiceByName().