Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for IsAbs (0.23 sec)

  1. internal/event/target/redis.go

    		if f != event.NamespaceFormat && f != event.AccessFormat {
    			return fmt.Errorf("unrecognized format")
    		}
    	}
    
    	if r.Key == "" {
    		return fmt.Errorf("empty key")
    	}
    
    	if r.QueueDir != "" {
    		if !filepath.IsAbs(r.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    	}
    
    	return nil
    }
    
    func (r RedisArgs) validateFormat(c redis.Conn) error {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 19 04:37:54 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  2. internal/event/target/nsq.go

    		return nil
    	}
    
    	if n.NSQDAddress.IsEmpty() {
    		return errors.New("empty nsqdAddress")
    	}
    
    	if n.Topic == "" {
    		return errors.New("empty topic")
    	}
    	if n.QueueDir != "" {
    		if !filepath.IsAbs(n.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    	}
    
    	return nil
    }
    
    // NSQTarget - NSQ target.
    type NSQTarget struct {
    	initOnce once.Init
    
    	id         event.TargetID
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 7.1K bytes
    - Viewed (0)
  3. internal/mountinfo/mountinfo_linux.go

    			return err
    		}
    	}
    	return nil
    }
    
    // CheckCrossDevice - check if given path has any sub-mounts in the input mounts list.
    func (mts mountInfos) checkCrossMounts(path string) error {
    	if !filepath.IsAbs(path) {
    		return fmt.Errorf("Invalid argument, path (%s) is expected to be absolute", path)
    	}
    	var crossMounts mountInfos
    	for _, mount := range mts {
    		// Add a separator to indicate that this is a proper mount-point.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  4. internal/event/target/mqtt.go

    	if err != nil {
    		return err
    	}
    	switch u.Scheme {
    	case "ws", "wss", "tcp", "ssl", "tls", "tcps":
    	default:
    		return errors.New("unknown protocol in broker address")
    	}
    	if m.QueueDir != "" {
    		if !filepath.IsAbs(m.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    		if m.QoS == 0 {
    			return errors.New("qos should be set to 1 or 2 if queueDir is set")
    		}
    	}
    
    	return nil
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 8.2K bytes
    - Viewed (0)
  5. internal/lock/lock_windows.go

    	// \\?\UNC\server\share paths because the rules for doing so
    	// are less well-specified.
    	if len(path) >= 2 && path[:2] == `\\` {
    		// Don't canonicalize UNC paths.
    		return path
    	}
    	if !filepath.IsAbs(path) {
    		// Relative path
    		return path
    	}
    
    	const prefix = `\\?`
    
    	pathbuf := make([]byte, len(prefix)+len(path)+len(`\`))
    	copy(pathbuf, prefix)
    	n := len(path)
    	r, w := 0, len(prefix)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  6. internal/event/target/amqp.go

    func (a *AMQPArgs) Validate() error {
    	if !a.Enable {
    		return nil
    	}
    	if _, err := amqp091.ParseURI(a.URL.String()); err != nil {
    		return err
    	}
    	if a.QueueDir != "" {
    		if !filepath.IsAbs(a.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    	}
    
    	return nil
    }
    
    // AMQPTarget - AMQP target
    type AMQPTarget struct {
    	initOnce once.Init
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 10K bytes
    - Viewed (0)
  7. internal/event/target/webhook.go

    // Validate WebhookArgs fields
    func (w WebhookArgs) Validate() error {
    	if !w.Enable {
    		return nil
    	}
    	if w.Endpoint.IsEmpty() {
    		return errors.New("endpoint empty")
    	}
    	if w.QueueDir != "" {
    		if !filepath.IsAbs(w.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    	}
    	if w.ClientCert != "" && w.ClientKey == "" || w.ClientCert == "" && w.ClientKey != "" {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Nov 20 22:40:07 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  8. internal/event/target/mysql.go

    			return fmt.Errorf("invalid port")
    		}
    		if m.Database == "" {
    			return fmt.Errorf("database unspecified")
    		}
    	}
    
    	if m.QueueDir != "" {
    		if !filepath.IsAbs(m.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    	}
    
    	if m.MaxOpenConnections < 0 {
    		return errors.New("maxOpenConnections cannot be less than zero")
    	}
    
    	return nil
    }
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 11.5K bytes
    - Viewed (0)
  9. internal/event/target/postgresql.go

    			return fmt.Errorf("invalid port")
    		}
    		if p.Database == "" {
    			return fmt.Errorf("database unspecified")
    		}
    	}
    
    	if p.QueueDir != "" {
    		if !filepath.IsAbs(p.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    	}
    
    	if p.MaxOpenConnections < 0 {
    		return errors.New("maxOpenConnections cannot be less than zero")
    	}
    
    	return nil
    }
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 17:51:07 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  10. internal/event/target/kafka.go

    		return errors.New("no broker address found")
    	}
    	for _, b := range k.Brokers {
    		if _, err := xnet.ParseHost(b.String()); err != nil {
    			return err
    		}
    	}
    	if k.QueueDir != "" {
    		if !filepath.IsAbs(k.QueueDir) {
    			return errors.New("queueDir path should be absolute")
    		}
    	}
    	if k.Version != "" {
    		if _, err := sarama.ParseKafkaVersion(k.Version); err != nil {
    			return err
    		}
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Feb 20 08:16:35 GMT 2024
    - 13K bytes
    - Viewed (0)
Back to top