- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for IsNotExist (0.11 sec)
-
internal/store/queuestore.go
// GetRaw - gets an item from the store. func (store *QueueStore[I]) GetRaw(key Key) (raw []byte, err error) { store.RLock() defer func(store *QueueStore[I]) { store.RUnlock() if err != nil && !os.IsNotExist(err) { // Upon error we remove the entry. store.Del(key) } }(store) raw, err = os.ReadFile(filepath.Join(store.directory, key.String())) if err != nil { return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.6K bytes - Viewed (0) -
cni/pkg/pluginlistener/listener.go
"fmt" "net" "os" "path/filepath" "istio.io/istio/pkg/log" ) func NewListener(path string) (net.Listener, error) { // Remove unix socket before use. if err := os.Remove(path); err != nil && !os.IsNotExist(err) { // Anything other than "file not found" is an error. return nil, fmt.Errorf("failed to remove unix://%s: %v", path, err) } // Attempt to create the folder in case it doesn't exist
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jan 26 20:34:28 UTC 2024 - 1.7K bytes - Viewed (0) -
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) -
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) -
internal/event/target/nsq.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 } // 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 - 7.1K bytes - Viewed (0) -
internal/event/target/webhook.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 would've 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 - 8.8K bytes - Viewed (0) -
internal/event/target/mqtt.go
if err != 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(err) { return nil } return err } if err = target.send(eventData); 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 - 8.2K bytes - Viewed (0) -
internal/mountinfo/mountinfo_linux_test.go
t.Errorf("got unexpected mountInfo[2]: %#v", mounts[2]) } } // Failure case mounts path doesn't exist, if not fail. { if _, err = readProcMounts(filepath.Join(dir, "non-existent")); err != nil && !os.IsNotExist(err) { t.Fatal(err) } } } // Tests read proc mounts reader. func TestReadProcMountFrom(t *testing.T) { successCase := `/dev/0 /path/to/0 type0 flags 0 0
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 7.3K bytes - Viewed (0) -
internal/event/target/redis.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 would've been already been sent successfully. if os.IsNotExist(eErr) { return nil } return eErr } if err := target.send(eventData); err != nil { if xnet.IsConnRefusedErr(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 - 9.1K bytes - Viewed (0) -
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)