Example #1
0
File: addr.go Project: postfix/goss
func NewAddr(sysAddr system.Addr) *Addr {
	address := sysAddr.Address()
	reachable, _ := sysAddr.Reachable()
	return &Addr{
		Address:   address,
		Reachable: reachable.(bool),
		Timeout:   500,
	}
}
Example #2
0
File: addr.go Project: ryancox/goss
func NewAddr(sysAddr system.Addr, config util.Config) (*Addr, error) {
	address := sysAddr.Address()
	reachable, err := sysAddr.Reachable()
	a := &Addr{
		Address:   address,
		Reachable: reachable.(bool),
		Timeout:   config.Timeout,
	}
	return a, err
}