Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for unmarshaller (0.18 sec)

  1. istioctl/pkg/util/configdump/wrapper.go

    }
    
    // Wrapper is a wrapper around the Envoy ConfigDump
    // It has extra helper functions for handling any/struct/marshal protobuf pain
    type Wrapper struct {
    	*admin.ConfigDump
    }
    
    // UnmarshalJSON is a custom unmarshaller to handle protobuf pain
    func (w *Wrapper) UnmarshalJSON(b []byte) error {
    	cd := &admin.ConfigDump{}
    	err := protomarshal.UnmarshalAllowUnknownWithAnyResolver(nonStrictResolver, b, cd)
    	*w = Wrapper{cd}
    	return err
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sun Apr 21 17:42:54 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  2. istioctl/pkg/util/clusters/wrapper.go

    type Wrapper struct {
    	*admin.Clusters
    }
    
    // MarshalJSON is a custom marshaller to handle protobuf pain
    func (w *Wrapper) MarshalJSON() ([]byte, error) {
    	return protomarshal.Marshal(w)
    }
    
    // UnmarshalJSON is a custom unmarshaller to handle protobuf pain
    func (w *Wrapper) UnmarshalJSON(b []byte) error {
    	cd := &admin.Clusters{}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Nov 03 08:41:32 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/envoy/configdump/endpoint.go

    	}
    	dump, err := c.retrieveSortedEndpointsSlice(filter)
    	if err != nil {
    		return err
    	}
    	marshaller := make(proto.MessageSlice, 0, len(dump))
    	for _, eds := range dump {
    		marshaller = append(marshaller, eds)
    	}
    	out, err := json.MarshalIndent(marshaller, "", "    ")
    	if err != nil {
    		return err
    	}
    	if outputFormat == "yaml" {
    		if out, err = yaml.JSONToYAML(out); err != nil {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sun Apr 21 17:42:54 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. istioctl/pkg/util/configdump/secret.go

    func (w *Wrapper) GetRootCAFromSecretConfigDump(anySec *anypb.Any) (string, error) {
    	var secret extapi.Secret
    	if err := anySec.UnmarshalTo(&secret); err != nil {
    		return "", fmt.Errorf("failed to unmarshall ROOTCA secret: %v", err)
    	}
    	var returnStr string
    	var returnErr error
    	rCASecret := secret.GetValidationContext()
    	if rCASecret != nil {
    		trustCA := rCASecret.GetTrustedCa()
    		if trustCA != nil {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Feb 25 04:09:53 GMT 2023
    - 2.2K bytes
    - Viewed (0)
  5. cni/pkg/util/pluginutil.go

    				fileModified <- struct{}{}
    			}
    		case err, ok := <-watcher.Errors:
    			if !ok {
    				return
    			}
    			errChan <- err
    		}
    	}
    }
    
    // Read CNI config from file and return the unmarshalled JSON as a map
    func ReadCNIConfigMap(path string) (map[string]any, error) {
    	cniConfig, err := os.ReadFile(path)
    	if err != nil {
    		return nil, err
    	}
    
    	var cniConfigMap map[string]any
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 3.6K bytes
    - Viewed (0)
Back to top