// IsWatchRunning verifies that watch is running and ready to go.
IsWatchRunning verifies that watch is running and ready to go.
// IsWatchRunning verifies that watch is running and ready to go .
func IsWatchRunning() error {
	conn, err := grpc.Dial(
		fmt.Sprintf("127.0.0.1:%d", viper.GetInt("port")),
		[]grpc.DialOption{
			grpc.WithTimeout(100 * time.Millisecond),
			grpc.WithBlock(),
			grpc.WithInsecure(),
		}...)
	if err != nil {
		log.Debug(err)
		return fmt.Errorf(watchNotRunningError)
	}
	if err := conn.Close(); err != nil {
		return err
	}
	return nil
}
func IsWatchRunning ( ) error { conn , err := grpc . Dial ( fmt . Sprintf ( " " , viper . GetInt ( " " ) ) , [ ] grpc . DialOption { grpc . WithTimeout ( 100 * time . Millisecond ) , grpc . WithBlock ( ) , grpc . WithInsecure ( ) , } ... ) if err != nil { log . Debug ( err ) return fmt . Errorf ( watchNotRunningError ) } if err := conn . Close ( ) ; err != nil { return err } return nil }
IsWatchRunning verifies that watch is running and ready to go.
IsWatchRunning verifies that watch is running and ready to go .
// This is connecting locally and it is very unlikely watch is overloaded, // set the timeout *super* short to make it easier on the users when they // forgot to start watch. // The assumption is that the only real error here is because watch isn't // running