docker/container.go
func (s *Container) WaitStartup(timeout time.Duration) error {
	nodes, err := s.NetworkNodes()
	if err != nil {
		return fmt.Errorf("Error getting network nodes: %v", err)
	}

	if !s.HasExposedPorts() {
		return fmt.Errorf("Current container has no exposed ports")
	}

	ok := raiqub.WaitPeerListening(
		nodes[0].Protocol, nodes[0].FormatDialAddress(), timeout)
	if !ok {
		err = fmt.Errorf("%s unreachable for %v",
			nodes[0].FormatDialAddress(), timeout)
	}

	return err
}
func (s *Container) WaitStartup(timeout time.Duration) error {
	nodes, err := s.NetworkNodes()
	if err != nil {
		return fmt.Errorf("Error getting network nodes: %v", err)
	}

	if !s.HasExposedPorts() {
		return fmt.Errorf("Current container has no exposed ports")
	}

	ok := raiqub.WaitPeerListening(
		nodes[0].Protocol, nodes[0].FormatDialAddress(), timeout)
	if !ok {
		err = fmt.Errorf("%s unreachable for %v",
			nodes[0].FormatDialAddress(), timeout)
	}

	return err
}
func ( s * Container ) WaitStartup ( timeout time . Duration ) error { nodes , err := s . NetworkNodes ( ) if err != nil { return fmt . Errorf ( " " , err ) } if ! s . HasExposedPorts ( ) { return fmt . Errorf ( " " ) } ok := raiqub . WaitPeerListening ( nodes [ 0 ] . Protocol , nodes [ 0 ] . FormatDialAddress ( ) , timeout ) if ! ok { err = fmt . Errorf ( " " , nodes [ 0 ] . FormatDialAddress ( ) , timeout ) } return err }
// WaitStartup blocks current thread until current container begins to listen
// exposed port.
WaitStartup blocks current thread until current container begins to listen exposed port .