Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for Rockarts (0.2 sec)

  1. internal/dsync/dsync-client_test.go

    func (restClient *ReconnectRESTClient) RLock(ctx context.Context, args LockArgs) (status bool, err error) {
    	return restClient.Call("/v1/rlock", args)
    }
    
    func (restClient *ReconnectRESTClient) Lock(ctx context.Context, args LockArgs) (status bool, err error) {
    	return restClient.Call("/v1/lock", args)
    }
    
    func (restClient *ReconnectRESTClient) RUnlock(ctx context.Context, args LockArgs) (status bool, err error) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 20 17:36:09 GMT 2022
    - 4.4K bytes
    - Viewed (0)
  2. 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 May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 2K bytes
    - Viewed (0)
  3. internal/dsync/dsync-server_test.go

    	}
    	return reply, nil
    }
    
    func (l *lockServer) Refresh(args *LockArgs) (reply bool, err error) {
    	if d := atomic.LoadInt64(&l.responseDelay); d != 0 {
    		time.Sleep(time.Duration(d))
    	}
    
    	l.mutex.Lock()
    	defer l.mutex.Unlock()
    	reply = !l.lockNotFound
    	return reply, nil
    }
    
    func (l *lockServer) ForceUnlock(args *LockArgs) (reply bool, err error) {
    	if d := atomic.LoadInt64(&l.responseDelay); d != 0 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 23 16:46:37 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  4. internal/dsync/lock-args.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package dsync
    
    //go:generate msgp -file $GOFILE
    
    // 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
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 04:34:26 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  5. cmd/lock-rest-client.go

    	return c.call(ctx, lockRPCRUnlock, &args)
    }
    
    // Refresh calls Refresh REST API.
    func (c *lockRESTClient) Refresh(ctx context.Context, args dsync.LockArgs) (reply bool, err error) {
    	return c.call(ctx, lockRPCRefresh, &args)
    }
    
    // Unlock calls write unlock RPC.
    func (c *lockRESTClient) Unlock(ctx context.Context, args dsync.LockArgs) (reply bool, err error) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Nov 24 17:07:14 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  6. cmd/local-locker.go

    				delete(l.lockUID, mapID)
    				idx++
    				continue
    			}
    			reply = true
    			l.removeEntry(resource, dsync.LockArgs{UID: args.UID}, &lris)
    			idx++
    		}
    	}
    }
    
    func (l *localLocker) Refresh(ctx context.Context, args dsync.LockArgs) (refreshed bool, err error) {
    	select {
    	case <-ctx.Done():
    		return false, ctx.Err()
    	default:
    		l.mutex.Lock()
    		defer l.mutex.Unlock()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. cmd/lock-rest-server-common_test.go

    		lockRequesterInfo2,
    	}
    
    	lri := locker.ll.lockMap["name"]
    
    	// test unknown uid
    	if locker.ll.removeEntry("name", dsync.LockArgs{
    		Owner: "owner",
    		UID:   "unknown-uid",
    	}, &lri) {
    		t.Errorf("Expected %#v, got %#v", false, true)
    	}
    
    	if !locker.ll.removeEntry("name", dsync.LockArgs{
    		Owner: "owner",
    		UID:   "0123-4567",
    	}, &lri) {
    		t.Errorf("Expected %#v, got %#v", true, false)
    	} else {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 23 17:26:21 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  8. internal/dsync/lock-args_gen.go

    package dsync
    
    // Code generated by github.com/tinylib/msgp DO NOT EDIT.
    
    import (
    	"github.com/tinylib/msgp/msgp"
    )
    
    // DecodeMsg implements msgp.Decodable
    func (z *LockArgs) DecodeMsg(dc *msgp.Reader) (err error) {
    	var field []byte
    	_ = field
    	var zb0001 uint32
    	zb0001, err = dc.ReadMapHeader()
    	if err != nil {
    		err = msgp.WrapError(err)
    		return
    	}
    	for zb0001 > 0 {
    		zb0001--
    		field, err = dc.ReadMapKeyPtr()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 9.5K bytes
    - Viewed (0)
  9. internal/dsync/locker.go

    	// Do read unlock for given LockArgs. It should return
    	// * a boolean to indicate success/failure of the operation
    	// * an error on failure of unlock request operation.
    	// Canceling the context will abort the remote call.
    	// In that case, the resource may or may not be unlocked.
    	RUnlock(ctx context.Context, args LockArgs) (bool, error)
    
    	// Do write unlock for given LockArgs. It should return
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 18 20:44:38 GMT 2022
    - 2.7K bytes
    - Viewed (0)
  10. internal/dsync/lock-args_gen_test.go

    		t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
    	}
    }
    
    func BenchmarkMarshalMsgLockArgs(b *testing.B) {
    	v := LockArgs{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgLockArgs(b *testing.B) {
    	v := LockArgs{}
    	bts := make([]byte, 0, v.Msgsize())
    	bts, _ = v.MarshalMsg(bts[0:0])
    	b.SetBytes(int64(len(bts)))
    	b.ReportAllocs()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 4.4K bytes
    - Viewed (0)
Back to top