- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for Marshal (0.21 sec)
-
cni/pkg/nodeagent/cni-watcher_test.go
} payload, _ := json.Marshal(valid) addEvent, err := processAddEvent(payload) assert.NoError(t, err) assert.Equal(t, valid, addEvent) } func TestProcessAddEventBadPayload(t *testing.T) { valid := CNIPluginAddEvent{ Netns: "/var/netns/foo", PodName: "pod-bingo", PodNamespace: "funkyns", } payload, _ := json.Marshal(valid) invalid := string(payload) + "funkyjunk"
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) -
istioctl/pkg/util/proto/messageslice.go
// limitations under the License. package proto import ( "bytes" "google.golang.org/protobuf/proto" "istio.io/istio/pkg/util/protomarshal" ) // MessageSlice allows us to marshal slices of protobuf messages like clusters/listeners/routes/endpoints correctly type MessageSlice []proto.Message // MarshalJSON handles marshaling of slices of proto messages
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Oct 19 21:53:59 GMT 2021 - 1.3K bytes - Viewed (0) -
cni/pkg/install/kubeconfig.go
} lcfg, err := latest.Scheme.ConvertToVersion(kcfg, latest.ExternalVersion) if err != nil { return kubeconfig{}, err } // Convert to v1 schema which has proper encoding fullYaml, err := yaml.Marshal(lcfg) if err != nil { return kubeconfig{}, err } // Log with redaction if err := api.RedactSecrets(kcfg); err != nil { return kubeconfig{}, err } for _, c := range kcfg.Clusters {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Aug 11 01:19:03 GMT 2023 - 4.9K bytes - Viewed (0) -
istioctl/pkg/workload/workload.go
iSpec, err := unstructureIstioType(spec) if err != nil { return nil, err } u.Object["spec"] = iSpec wgYAML, err := yaml.Marshal(u.Object) if err != nil { return nil, err } return wgYAML, nil } func configureCommand(ctx cli.Context) *cobra.Command { var opts clioptions.ControlPlaneOptions
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Apr 17 20:06:41 GMT 2024 - 25.5K bytes - Viewed (0) -
cni/pkg/plugin/cnieventclient.go
} // Currently we only use the netns from the original CNI event addEvent := nodeagent.CNIPluginAddEvent{Netns: event.Netns, PodName: podName, PodNamespace: podNamespace, IPs: ncconfigs} eventData, err := json.Marshal(addEvent) if err != nil { return err } var response *http.Response response, err = cniClient.client.Post(cniClient.url, "application/json", bytes.NewBuffer(eventData)) if err != nil { return err }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 2.4K bytes - Viewed (0) -
cni/pkg/util/pluginutil.go
plugin, ok := rawPlugin.(map[string]any) if !ok { err = fmt.Errorf("error reading plugin from CNI config plugin list") return } return } // Marshal the CNI config map and append a new line func MarshalCNIConfig(cniConfigMap map[string]any) ([]byte, error) { cniConfig, err := json.MarshalIndent(cniConfigMap, "", " ") if err != nil { return nil, err }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 3.6K bytes - Viewed (0) -
istioctl/pkg/writer/ztunnel/configdump/services.go
if r := cmp.Compare(a.Name, b.Name); r != 0 { return r } return cmp.Compare(a.Hostname, b.Hostname) }) out, err := json.MarshalIndent(svcs, "", " ") if err != nil { return fmt.Errorf("failed to marshal workloads: %v", err) } if outputFormat == "yaml" { if out, err = yaml.JSONToYAML(out); err != nil { return err } } fmt.Fprintln(c.Stdout, string(out)) return nil
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Apr 23 21:30:30 GMT 2024 - 2.8K bytes - Viewed (0) -
istioctl/pkg/util/configdump/wrapper.go
return msg.ProtoReflect().Type(), nil } return typ, nil } // 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{}
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Sun Apr 21 17:42:54 GMT 2024 - 1.8K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/configdump.go
} bootstrapDump, err := c.configDump.GetBootstrapConfigDump() if err != nil { return err } out, err := protomarshal.ToJSONWithIndent(bootstrapDump, " ") if err != nil { return fmt.Errorf("unable to marshal bootstrap in Envoy config dump: %v", err) } if outputFormat == "yaml" { outbyte, err := yaml.JSONToYAML([]byte(out)) if err != nil { return err } out = string(outbyte) }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Thu Feb 29 20:46:41 GMT 2024 - 7.4K bytes - Viewed (0) -
istioctl/pkg/util/formatting/formatter.go
func printJSON(ms diag.Messages) (string, error) { jsonOutput, err := json.MarshalIndent(ms, "", "\t") return string(jsonOutput), err } func printYAML(ms diag.Messages) (string, error) { yamlOutput, err := yaml.Marshal(ms) return string(yamlOutput), err } // Formatting options for Message var ( colorPrefixes = map[diag.Level]string{ diag.Info: "", // no special color for info messages
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Jul 11 02:41:45 GMT 2023 - 3.1K bytes - Viewed (0)