Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 188 for unmarshaler (0.42 sec)

  1. pilot/pkg/util/protoconv/protoconv.go

    	if err != nil {
    		return nil
    	}
    	return res
    }
    
    func UnmarshalAny[T any](a *anypb.Any) (*T, error) {
    	dst := any(new(T)).(proto.Message)
    	if err := a.UnmarshalTo(dst); err != nil {
    		return nil, fmt.Errorf("failed to unmarshal to %T: %v", dst, err)
    	}
    	return any(dst).(*T), nil
    }
    
    // https://github.com/planetscale/vtprotobuf#available-features
    type vtStrictMarshal interface {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 02 04:55:40 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  2. pilot/pkg/model/telemetry_test.go

    						w := &stats.PluginConfig{}
    						if err := f.GetTypedConfig().UnmarshalTo(w); err != nil {
    							t.Fatal(err)
    						}
    						cfgJSON, _ := protomarshal.MarshalProtoNames(w)
    						res[f.GetName()] = string(cfgJSON)
    					} else {
    						w := &httpwasm.Wasm{}
    
    						if err := f.GetTypedConfig().UnmarshalTo(w); err != nil {
    							t.Fatal(err)
    						}
    						cfg := &wrappers.StringValue{}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 04:34:30 UTC 2024
    - 39.6K bytes
    - Viewed (0)
  3. pkg/kube/apimirror/probe.go

    	Type   Type
    	IntVal int32
    	StrVal string
    }
    
    // UnmarshalJSON implements the json.Unmarshaller interface.
    func (intstr *IntOrString) UnmarshalJSON(value []byte) error {
    	if value[0] == '"' {
    		intstr.Type = String
    		return json.Unmarshal(value, &intstr.StrVal)
    	}
    	intstr.Type = Int
    	return json.Unmarshal(value, &intstr.IntVal)
    }
    
    // MarshalJSON implements the json.Marshaller interface.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  4. istioctl/pkg/version/version.go

    			switch resource.TypeUrl {
    			case "type.googleapis.com/envoy.config.core.v3.Node":
    				node := core.Node{}
    				err := resource.UnmarshalTo(&node)
    				if err != nil {
    					return nil, fmt.Errorf("could not unmarshal Node: %w", err)
    				}
    				meta, err := model.ParseMetadata(node.Metadata)
    				if err != nil || meta.ProxyConfig == nil {
    					// Skip non-sidecars (e.g. istioctl queries)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Mar 15 01:18:49 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  5. pilot/pkg/networking/core/networkfilter_test.go

    	}
    	if config, ok := redisFilter.ConfigType.(*listener.Filter_TypedConfig); ok {
    		redisProxy := redis.RedisProxy{}
    		if err := config.TypedConfig.UnmarshalTo(&redisProxy); err != nil {
    			t.Errorf("unmarshal failed: %v", err)
    		}
    		if redisProxy.StatPrefix != "redis" {
    			t.Errorf("redis proxy statPrefix is %s", redisProxy.StatPrefix)
    		}
    		if !redisProxy.LatencyInMicros {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 22:20:44 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  6. pkg/kube/inject/webhook.go

    			var existingKubeAppProber KubeAppProbers
    			err := json.Unmarshal([]byte(env.Value), &existingKubeAppProber)
    			if err != nil {
    				log.Errorf("failed to unmarshal existing kubeAppProbers %v", err)
    				return envVars
    			}
    			var newKubeAppProber KubeAppProbers
    			err = json.Unmarshal([]byte(newProbers), &newKubeAppProber)
    			if err != nil {
    				log.Errorf("failed to unmarshal new kubeAppProbers %v", err)
    				return envVars
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 17:59:39 UTC 2024
    - 42.2K bytes
    - Viewed (0)
  7. src/regexp/all_test.go

    }
    
    func TestUnmarshalText(t *testing.T) {
    	unmarshaled := new(Regexp)
    	for i := range goodRe {
    		re := compileTest(t, goodRe[i], "")
    		marshaled, err := re.MarshalText()
    		if err != nil {
    			t.Errorf("regexp %#q failed to marshal: %s", re, err)
    			continue
    		}
    		if err := unmarshaled.UnmarshalText(marshaled); err != nil {
    			t.Errorf("regexp %#q failed to unmarshal: %s", re, err)
    			continue
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  8. pkg/kubelet/volumemanager/reconciler/reconstruct_common.go

    	utilstrings "k8s.io/utils/strings"
    )
    
    // these interfaces are necessary to keep the structures private
    // and at the same time log them correctly in structured logs.
    var _ logr.Marshaler = podVolume{}
    var _ logr.Marshaler = reconstructedVolume{}
    var _ logr.Marshaler = globalVolumeInfo{}
    
    type podVolume struct {
    	podName        volumetypes.UniquePodName
    	volumeSpecName string
    	volumePath     string
    	pluginName     string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 09 07:34:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/interfaces.go

    	// match 'opts.ResourceVersion' according 'opts.ResourceVersionMatch'.
    	Get(ctx context.Context, key string, opts GetOptions, objPtr runtime.Object) error
    
    	// GetList unmarshalls objects found at key into a *List api object (an object
    	// that satisfies runtime.IsList definition).
    	// If 'opts.Recursive' is false, 'key' is used as an exact match. If `opts.Recursive'
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 07:53:48 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/ztunnel/configdump/configdump.go

    	// TODO(fisherxu): migrate this to jsonpb when issue fixed in golang
    	// Issue to track -> https://github.com/golang/protobuf/issues/632
    	err := json.Unmarshal(b, rawDump)
    	if err != nil {
    		return fmt.Errorf("error unmarshalling config dump response from ztunnel: %v", err)
    	}
    	// ensure that data gets unmarshalled into the right data type
    	if err := unmarshalListOrMap(rawDump.Services, &zDump.Services); err != nil {
    		return err
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 20:18:34 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top