Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for IsNotExist (0.17 sec)

  1. internal/event/target/kafka.go

    			// Such events will not exist and wouldve been already been sent successfully.
    			if os.IsNotExist(err) {
    				return nil
    			}
    			return err
    		}
    		err = target.send(event)
    	case key.ItemCount > 1:
    		var events []event.Event
    		events, err = target.store.GetMultiple(key)
    		if err != nil {
    			if os.IsNotExist(err) {
    				return nil
    			}
    			return err
    		}
    		err = target.sendMultiple(events)
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  2. internal/kms/config.go

    		}, nil
    	default:
    		var s string
    		if lookup(EnvKMSSecretKeyFile) {
    			b, err := os.ReadFile(env.Get(EnvKMSSecretKeyFile, ""))
    			if err != nil && !os.IsNotExist(err) {
    				return nil, err
    			}
    			if os.IsNotExist(err) {
    				// Relative path where "/run/secrets" is the default docker path for secrets
    				b, err = os.ReadFile(filepath.Join("/run/secrets", env.Get(EnvKMSSecretKeyFile, "")))
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 11:46:39 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  3. cmd/common-main.go

    	// relative to /run/secrets/ position.
    	if isFile(pathJoin("/run/secrets/", sp)) {
    		sp = pathJoin("/run/secrets/", sp)
    	}
    	credBuf, err := os.ReadFile(sp)
    	if err != nil {
    		if os.IsNotExist(err) { // ignore if file doesn't exist.
    			return "", nil
    		}
    		return "", err
    	}
    	return string(bytes.TrimSpace(credBuf)), nil
    }
    
    func loadEnvVarsFromFiles() {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 21:50:11 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  4. internal/event/target/postgresql.go

    	if eErr != nil {
    		// The last event key in a successful batch will be sent in the channel atmost once by the replayEvents()
    		// Such events will not exist and wouldve been already been sent successfully.
    		if os.IsNotExist(eErr) {
    			return nil
    		}
    		return eErr
    	}
    
    	if err := target.send(eventData); err != nil {
    		if IsConnErr(err) {
    			return store.ErrNotConnected
    		}
    		return err
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. internal/event/target/amqp.go

    	if eErr != nil {
    		// The last event key in a successful batch will be sent in the channel atmost once by the replayEvents()
    		// Such events will not exist and wouldve been already been sent successfully.
    		if os.IsNotExist(eErr) {
    			return nil
    		}
    		return eErr
    	}
    
    	if err := target.send(eventData, ch, confirms); err != nil {
    		return err
    	}
    
    	// Delete the event from store.
    	return target.store.Del(key)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 10K bytes
    - Viewed (0)
  6. internal/logger/target/kafka/kafka.go

    	return nil
    }
    
    // SendFromStore - reads the log from store and sends it to kafka.
    func (h *Target) SendFromStore(key store.Key) (err error) {
    	auditEntry, err := h.store.Get(key)
    	if err != nil {
    		if os.IsNotExist(err) {
    			return nil
    		}
    		return err
    	}
    	atomic.AddInt64(&h.totalMessages, 1)
    	err = h.send(auditEntry)
    	if err != nil {
    		atomic.AddInt64(&h.failedMessages, 1)
    		return
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  7. internal/event/target/mysql.go

    	if eErr != nil {
    		// The last event key in a successful batch will be sent in the channel atmost once by the replayEvents()
    		// Such events will not exist and wouldve been already been sent successfully.
    		if os.IsNotExist(eErr) {
    			return nil
    		}
    		return eErr
    	}
    
    	if err := target.send(eventData); err != nil {
    		if IsConnErr(err) {
    			return store.ErrNotConnected
    		}
    		return err
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  8. internal/event/target/nats.go

    	if eErr != nil {
    		// The last event key in a successful batch will be sent in the channel atmost once by the replayEvents()
    		// Such events will not exist and wouldve been already been sent successfully.
    		if os.IsNotExist(eErr) {
    			return nil
    		}
    		return eErr
    	}
    
    	if err := target.send(eventData); err != nil {
    		return err
    	}
    
    	return target.store.Del(key)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  9. cni/test/install_cni.go

    func checkBinDir(t *testing.T, tempCNIBinDir, op string, files ...string) error {
    	t.Helper()
    	for _, f := range files {
    		if _, err := os.Stat(tempCNIBinDir + "/" + f); !os.IsNotExist(err) {
    			if op == "add" {
    				t.Logf("PASS: File %v was added to %v", f, tempCNIBinDir)
    				return nil
    			} else if op == "del" {
    				return fmt.Errorf("FAIL: File %v was not removed from %v", f, tempCNIBinDir)
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Aug 01 18:38:14 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  10. internal/event/target/elasticsearch.go

    	if eErr != nil {
    		// The last event key in a successful batch will be sent in the channel atmost once by the replayEvents()
    		// Such events will not exist and wouldve been already been sent successfully.
    		if os.IsNotExist(eErr) {
    			return nil
    		}
    		return eErr
    	}
    
    	if err := target.send(eventData); err != nil {
    		if xnet.IsNetworkOrHostDown(err, false) {
    			return store.ErrNotConnected
    		}
    		return err
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 15K bytes
    - Viewed (0)
Back to top