Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for deserialize (0.17 sec)

  1. 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 08 22:53:08 GMT 2024
    - Last Modified: Thu May 02 21:29:40 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  2. 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 08 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 18:52:24 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. istioctl/pkg/kubeinject/kubeinject.go

    		return nil, err
    	}
    	defer resp.Body.Close()
    	body, err := io.ReadAll(resp.Body)
    	if err != nil {
    		return nil, err
    	}
    	var obj runtime.Object
    	var ar *kube.AdmissionReview
    	out, _, err := deserializer.Decode(body, nil, obj)
    	if err != nil {
    		return nil, fmt.Errorf("could not decode body: %v", err)
    	}
    	ar, err = kube.AdmissionReviewKubeToAdapter(out)
    	if err != nil {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 29 02:29:02 GMT 2024
    - 21.6K bytes
    - Viewed (0)
  7. misc/go_android_exec/main.go

    	log.SetPrefix("go_android_exec: ")
    	exitCode, err := runMain()
    	if err != nil {
    		log.Fatal(err)
    	}
    	os.Exit(exitCode)
    }
    
    func runMain() (int, error) {
    	// Concurrent use of adb is flaky, so serialize adb commands.
    	// See https://github.com/golang/go/issues/23795 or
    	// https://issuetracker.google.com/issues/73230216.
    	lockPath := filepath.Join(os.TempDir(), "go_android_exec-adb-lock")
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Aug 21 17:46:57 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  8. cni/pkg/plugin/plugin.go

    	// Parse previous result. Remove this if your plugin is not chained.
    	if conf.RawPrevResult != nil {
    		resultBytes, err := json.Marshal(conf.RawPrevResult)
    		if err != nil {
    			return nil, fmt.Errorf("could not serialize prevResult: %v", err)
    		}
    		res, err := version.NewResult(conf.CNIVersion, resultBytes)
    		if err != nil {
    			return nil, fmt.Errorf("could not parse prevResult: %v", err)
    		}
    		conf.RawPrevResult = nil
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed May 08 15:58:51 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  9. cmd/s3-zip-handlers.go

    	files, srcInfo, err := getFilesListFromZIPObject(ctx, objectAPI, bucket, object, opts)
    	if err != nil {
    		return nil, err
    	}
    	files.OptimizeSize()
    	zipInfo, err := files.Serialize()
    	if err != nil {
    		return nil, err
    	}
    	at := archiveType
    	zipInfoStr := string(zipInfo)
    	if opts.EncryptFn != nil {
    		at = archiveTypeEnc
    		zipInfoStr = string(opts.EncryptFn(archiveTypeEnc, zipInfo))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Apr 09 10:41:25 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  10. misc/ios/go_ios_exec.go

    	"time"
    )
    
    const debug = false
    
    var tmpdir string
    
    var (
    	devID    string
    	appID    string
    	teamID   string
    	bundleID string
    	deviceID string
    )
    
    // lock is a file lock to serialize iOS runs. It is global to avoid the
    // garbage collector finalizing it, closing the file and releasing the
    // lock prematurely.
    var lock *os.File
    
    func main() {
    	log.SetFlags(0)
    	log.SetPrefix("go_ios_exec: ")
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Apr 11 16:34:30 GMT 2022
    - 23.4K bytes
    - Viewed (0)
Back to top