- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for IsUnixDomainSocket (0.22 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/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)