Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 567 for Lock (0.18 sec)

  1. internal/dsync/lock-args.go

    // LockArgs is minimal required values for any dsync compatible lock operation.
    type LockArgs struct {
    	// Unique ID of lock/unlock request.
    	UID string
    
    	// Resources contains single or multiple entries to be locked/unlocked.
    	Resources []string
    
    	// Source contains the line number, function and file name of the code
    	// on the client node that requested the lock.
    	Source string
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 04:34:26 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  2. internal/lock/lock_windows.go

    		}
    	}
    
    	return &LockedFile{File: f}, nil
    }
    
    // TryLockedOpenFile - tries a new write lock, functionality
    // it is similar to LockedOpenFile with with syscall.LOCK_EX
    // mode but along with syscall.LOCK_NB such that the function
    // doesn't wait forever but instead returns if it cannot
    // acquire a write lock.
    func TryLockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) {
    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)
  3. cmd/lock-rest-server.go

    }
    
    // LockHandler - Acquires a lock.
    func (l *lockRESTServer) LockHandler(args *dsync.LockArgs) (*dsync.LockResp, *grid.RemoteErr) {
    	resp := lockRPCLock.NewResponse()
    	success, err := l.ll.Lock(context.Background(), *args)
    	if err == nil && !success {
    		return l.makeResp(resp, errLockConflict)
    	}
    	return l.makeResp(resp, err)
    }
    
    // UnlockHandler - releases the acquired lock.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  4. cmd/namespace-lock_test.go

    		// lk1; ref=1
    		if !nsLk.lock(ctx, "volume", "path", "source", "opsID", false, time.Second) {
    			t.Fatal("failed to acquire lock")
    		}
    
    		// lk2
    		lk2ch := make(chan struct{})
    		go func() {
    			defer close(lk2ch)
    			nsLk.lock(ctx, "volume", "path", "source", "opsID", false, 1*time.Millisecond)
    		}()
    		time.Sleep(1 * time.Millisecond) // wait for goroutine to advance; ref=2
    
    		// Unlock the 1st lock; ref=1 after this line
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 3.1K bytes
    - Viewed (0)
  5. cmd/lock-rest-client.go

    	default:
    		err = errors.New(r.Err)
    	}
    	return ok, err
    }
    
    // RLock calls read lock REST API.
    func (c *lockRESTClient) RLock(ctx context.Context, args dsync.LockArgs) (reply bool, err error) {
    	return c.call(ctx, lockRPCRLock, &args)
    }
    
    // Lock calls lock REST API.
    func (c *lockRESTClient) Lock(ctx context.Context, args dsync.LockArgs) (reply bool, err error) {
    	return c.call(ctx, lockRPCLock, &args)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Nov 24 17:07:14 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  6. internal/lock/lock_windows_test.go

    // GNU Affero General Public License for more details.
    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package lock
    
    import (
    	"strings"
    	"testing"
    )
    
    func TestFixLongPath(t *testing.T) {
    	// 248 is long enough to trigger the longer-than-248 checks in
    	// fixLongPath, but short enough not to make a path component
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  7. cmd/bucket-object-lock.go

    					return ObjectLocked{}
    				}
    
    				if !ret.RetainUntilDate.Before(t) {
    					return ObjectLocked{}
    				}
    				return nil
    			}
    			// https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html#object-lock-retention-modes
    			// If you try to delete objects protected by governance mode and have s3:BypassGovernanceRetention, the operation will succeed.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  8. cmd/lock-rest-server-common.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"errors"
    )
    
    var (
    	errLockConflict       = errors.New("lock conflict")
    	errLockNotInitialized = errors.New("lock not initialized")
    	errLockNotFound       = errors.New("lock not found")
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 973 bytes
    - Viewed (0)
  9. internal/dsync/lock-args_gen.go

    Klaus Post <******@****.***> 1700528975 -0800
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 9.5K bytes
    - Viewed (0)
  10. cmd/lock-rest-client_test.go

    	// Attempt all calls.
    	_, err = lkClient.RLock(context.Background(), dsync.LockArgs{})
    	if err == nil {
    		t.Fatal("Expected for Rlock to fail")
    	}
    
    	_, err = lkClient.Lock(context.Background(), dsync.LockArgs{})
    	if err == nil {
    		t.Fatal("Expected for Lock to fail")
    	}
    
    	_, err = lkClient.RUnlock(context.Background(), dsync.LockArgs{})
    	if err == nil {
    		t.Fatal("Expected for RUnlock to fail")
    	}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 2K bytes
    - Viewed (0)
Back to top