Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for reserialize (0.39 sec)

  1. cmd/xl-storage-meta-inline.go

    		if err != nil {
    			return keys, err
    		}
    	}
    	return keys, nil
    }
    
    // serialize will serialize the provided keys and values.
    // The function will panic if keys/value slices aren't of equal length.
    // Payload size can give an indication of expected payload size.
    // If plSize is <= 0 it will be calculated.
    func (x *xlMetaInlineData) serialize(plSize int, keys [][]byte, vals [][]byte) {
    	if len(keys) != len(vals) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  2. cmd/data-usage_test.go

    	var got dataUsageCache
    	err = got.deserialize(&buf)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if got.Info.LastUpdate.IsZero() {
    		t.Error("lastupdate not set")
    	}
    
    	if !want.Info.LastUpdate.Equal(got.Info.LastUpdate) {
    		t.Fatalf("deserialize LastUpdate mismatch\nwant: %+v\ngot:  %+v", want, got)
    	}
    	if len(want.Cache) != len(got.Cache) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Mar 27 15:10:40 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  3. istioctl/pkg/tag/generate.go

    	scheme := runtime.NewScheme()
    	codecFactory := serializer.NewCodecFactory(scheme)
    	deserializer := codecFactory.UniversalDeserializer()
    	serializer := json.NewSerializerWithOptions(
    		json.DefaultMetaFactory, nil, nil, json.SerializerOptions{
    			Yaml:   true,
    			Pretty: true,
    			Strict: true,
    		})
    
    	whObject, _, err := deserializer.Decode([]byte(validatingWebhookYAML), nil, &admitv1.ValidatingWebhookConfiguration{})
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Jan 16 17:43:49 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/cni-watcher_test.go

    		types.MergePatchType, labelsPatch, metav1.PatchOptions{})
    	assert.NoError(t, err)
    
    	client.RunAndWait(ctx.Done())
    
    	payload, _ := json.Marshal(valid)
    
    	// serialize our fake plugin event
    	addEvent, err := processAddEvent(payload)
    	assert.Equal(t, err, nil)
    
    	// Push it thru the handler
    	pluginServer.ReconcileCNIAddEvent(ctx, addEvent)
    
    	waitForMockCalls()
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Feb 02 08:18:40 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/cni-watcher.go

    	var msg CNIPluginAddEvent
    	err := json.Unmarshal(body, &msg)
    	if err != nil {
    		log.Errorf("Failed to unmarshal CNI plugin event: %v", err)
    		return msg, err
    	}
    
    	log.Debugf("Deserialized CNI plugin event: %+v", msg)
    	return msg, nil
    }
    
    func (s *CniPluginServer) ReconcileCNIAddEvent(ctx context.Context, addCmd CNIPluginAddEvent) error {
    	log := log.WithLabels("cni-event", addCmd)
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Feb 08 18:52:24 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  6. internal/grid/types.go

    	}
    	return (*m)[key]
    }
    
    // Set a key, value pair.
    func (m *MSS) Set(key, value string) {
    	if m == nil {
    		*m = mssPool.Get().(map[string]string)
    	}
    	(*m)[key] = value
    }
    
    // UnmarshalMsg deserializes m from the provided byte slice and returns the
    // remainder of bytes.
    func (m *MSS) UnmarshalMsg(bts []byte) (o []byte, err error) {
    	if m == nil {
    		return bts, errors.New("MSS: UnmarshalMsg on nil pointer")
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 01 23:42:09 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  7. cmd/erasure-object.go

    		//   inconsequential to the overall read operation.
    		// - xl.meta metadata is still verified for quorum under lock()
    		//   however writing the response doesn't need to serialize
    		//   concurrent writers
    		unlockOnDefer = true
    		nsUnlocker = func() { lock.RUnlock(lkctx) }
    	}
    
    	fi, metaArr, onlineDisks, err := er.getObjectFileInfo(ctx, bucket, object, opts, true)
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun May 05 16:56:21 GMT 2024
    - 77.2K bytes
    - Viewed (2)
  8. cmd/streaming-signature-v4.go

    		if err == io.EOF {
    			err = io.ErrUnexpectedEOF
    		}
    		if err != nil {
    			cr.err = err
    			return n, cr.err
    		}
    		if b == ';' { // separating character
    			break
    		}
    
    		// Manually deserialize the size since AWS specified
    		// the chunk size to be of variable width. In particular,
    		// a size of 16 is encoded as `10` while a size of 64 KB
    		// is `10000`.
    		switch {
    		case b >= '0' && b <= '9':
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 18.2K bytes
    - Viewed (0)
  9. cmd/xl-storage.go

    			if target == "" {
    				continue
    			}
    			select {
    			case s.immediatePurge <- target:
    			default:
    				// Too much back pressure, we will perform the delete
    				// blocking at this point we need to serialize operations.
    				removeAll(target)
    			}
    		}
    	}
    
    	return nil
    }
    
    // DeleteVersion - deletes FileInfo metadata for path at `xl.meta`. forceDelMarker
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 84.7K bytes
    - Viewed (0)
  10. cmd/metacache-entries.go

    	}
    	selected.cached.versions = mergeXLV2Versions(r.objQuorum, r.strict, r.requestedVersions, r.candidates...)
    	if len(selected.cached.versions) == 0 {
    		return nil, false
    	}
    
    	// Reserialize
    	var err error
    	selected.metadata, err = selected.cached.AppendTo(metaDataPoolGet())
    	if err != nil {
    		bugLogIf(context.Background(), err)
    		return nil, false
    	}
    	return selected, true
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:43:43 GMT 2024
    - 23.2K bytes
    - Viewed (0)
Back to top