- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for IsUnixDomainSocket (0.38 sec)
-
pkg/util/filesystem/util_windows_test.go
defer pipeln.Close() require.NoErrorf(t, err, "Failed to listen on named pipe for test purposes: %v", err) result, err := IsUnixDomainSocket(testFile) assert.NoError(t, err, "Unexpected error from IsUnixDomainSocket.") assert.False(t, result, "Unexpected result: true from IsUnixDomainSocket.") } // This is required as on Windows it's possible for the socket file backing a Unix domain socket to
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Apr 18 09:10:26 UTC 2024 - 3.2K bytes - Viewed (0) -
pkg/util/filesystem/util_unix.go
limitations under the License. */ package filesystem import ( "fmt" "os" "path/filepath" ) // IsUnixDomainSocket returns whether a given file is a AF_UNIX socket file func IsUnixDomainSocket(filePath string) (bool, error) { fi, err := os.Stat(filePath) if err != nil { return false, fmt.Errorf("stat file %s failed: %v", filePath, err) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 10 17:13:59 UTC 2024 - 1.1K bytes - Viewed (0) -
pkg/util/filesystem/util_test.go
fileToTest = fileToTest + ".invalid" } result, err := IsUnixDomainSocket(fileToTest) if test.listenOnSocket { // this takes care of removing the file associated with the domain socket ln.Close() } else { // explicitly remove regular file os.Remove(addr) } if test.expectError { assert.Errorf(t, err, "Unexpected nil error from IsUnixDomainSocket for %s", test.label) } else {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 10 17:13:59 UTC 2024 - 3.8K bytes - Viewed (0) -
pkg/kubelet/util/util.go
// be served from apiserver cache instead of from etcd. func FromApiserverCache(opts *metav1.GetOptions) { opts.ResourceVersion = "0" } var IsUnixDomainSocket = filesystem.IsUnixDomainSocket // GetNodenameForKernel gets hostname value to set in the hostname field (the nodename field of struct utsname) of the pod.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 17 18:07:39 UTC 2023 - 2.3K bytes - Viewed (0) -
pkg/util/filesystem/util_windows.go
socketDialTimeout = 4 * time.Second ) // IsUnixDomainSocket returns whether a given file is a AF_UNIX socket file // Note that due to the retry logic inside, it could take up to 4 seconds // to determine whether or not the file path supplied is a Unix domain socket func IsUnixDomainSocket(filePath string) (bool, error) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 10 17:13:59 UTC 2024 - 4K bytes - Viewed (0) -
pkg/kubelet/pluginmanager/pluginwatcher/plugin_watcher.go
} mode := info.Mode() if mode.IsDir() { if err := w.fsWatcher.Add(path); err != nil { return fmt.Errorf("failed to watch %s, err: %v", path, err) } } else if isSocket, _ := util.IsUnixDomainSocket(path); isSocket { event := fsnotify.Event{ Name: path, Op: fsnotify.Create, } //TODO: Handle errors by taking corrective measures if err := w.handleCreateEvent(event); err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Jan 01 00:26:37 UTC 2023 - 6.1K bytes - Viewed (0) -
pkg/volume/util/hostutil/hostutil_windows.go
// on Windows. In this case, we need to use a different method to check if it's a Unix Socket. if err == errUnknownFileType || isSystemCannotAccessErr(err) { if isSocket, errSocket := filesystem.IsUnixDomainSocket(pathname); errSocket == nil && isSocket { return FileTypeSocket, nil } } return filetype, err } // PathExists checks whether the path exists
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 28 13:38:40 UTC 2024 - 4.7K bytes - Viewed (0)