Esempio n. 1
0
File: addr.go Progetto: postfix/goss
func NewAddr(sysAddr system.Addr) *Addr {
	address := sysAddr.Address()
	reachable, _ := sysAddr.Reachable()
	return &Addr{
		Address:   address,
		Reachable: reachable.(bool),
		Timeout:   500,
	}
}
Esempio n. 2
0
File: addr.go Progetto: 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
}