Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewRemoteErrString (0.46 sec)

  1. internal/grid/handlers.go

    func NewNPErr(err error) (NoPayload, *RemoteErr) {
    	if err == nil {
    		return NoPayload{}, nil
    	}
    	r := RemoteErr(err.Error())
    	return NoPayload{}, &r
    }
    
    // NewRemoteErrString creates a new remote error from a string.
    func NewRemoteErrString(msg string) *RemoteErr {
    	r := RemoteErr(msg)
    	return &r
    }
    
    func (r RemoteErr) Error() string {
    	return string(r)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 16:58:30 UTC 2024
    - 27.7K bytes
    - Viewed (0)
  2. internal/grid/grid_test.go

    				var n byte
    				<-processHandler
    				for {
    					select {
    					case in, ok := <-request:
    						if !ok {
    							return nil
    						}
    						if in[0] != n {
    							return NewRemoteErrString(fmt.Sprintf("expected incoming %d, got %d", n, in[0]))
    						}
    						n++
    						resp <- append([]byte{}, in...)
    					case <-ctx.Done():
    						return NewRemoteErr(ctx.Err())
    					}
    				}
    			},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  3. cmd/storage-rest-server.go

    	if !s.checkID(params.DiskID) {
    		return grid.NewRemoteErr(errDiskNotFound)
    	}
    	if params.Cache == nil {
    		return grid.NewRemoteErrString("NSScannerHandler: provided cache is nil")
    	}
    
    	// Collect updates, stream them before the full cache is sent.
    	updates := make(chan dataUsageEntry, 1)
    	var wg sync.WaitGroup
    	wg.Add(1)
    	go func() {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 45.7K bytes
    - Viewed (0)
  4. internal/grid/connection.go

    		var start time.Time
    		if m.DeadlineMS > 0 {
    			start = time.Now()
    		}
    		var b []byte
    		var err *RemoteErr
    		func() {
    			defer func() {
    				if rec := recover(); rec != nil {
    					err = NewRemoteErrString(fmt.Sprintf("handleMessages: panic recovered: %v", rec))
    					debug.PrintStack()
    					gridLogIf(ctx, err)
    				}
    			}()
    			b, err = handler(m.Payload)
    			if debugPrint {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 46.7K bytes
    - Viewed (0)
Back to top