예제 #1
0
파일: addr.go 프로젝트: postfix/goss
func NewAddr(sysAddr system.Addr) *Addr {
	address := sysAddr.Address()
	reachable, _ := sysAddr.Reachable()
	return &Addr{
		Address:   address,
		Reachable: reachable.(bool),
		Timeout:   500,
	}
}
예제 #2
0
파일: addr.go 프로젝트: 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
}