- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 155 for Buffer (0.43 sec)
-
istioctl/pkg/util/proto/messageslice.go
func (pSlice MessageSlice) MarshalJSON() ([]byte, error) { buffer := bytes.NewBufferString("[") sliceLength := len(pSlice) for index, msg := range pSlice { b, err := protomarshal.Marshal(msg) if err != nil { return nil, err } buffer.Write(b) if index < sliceLength-1 { buffer.WriteString(",") } } buffer.WriteString("]") return buffer.Bytes(), nil
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/util/executil.go
return &ExecList{ Cmd: cmd, Args: args, } } func ExecuteOutput(cmd string, args ...string) (string, error) { externalCommand := exec.Command(cmd, args...) stdout := &bytes.Buffer{} stderr := &bytes.Buffer{} externalCommand.Stdout = stdout externalCommand.Stderr = stderr err := externalCommand.Run() if err != nil || len(stderr.Bytes()) != 0 { return stderr.String(), err }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 1.8K bytes - Viewed (0) -
istioctl/pkg/writer/compare/cluster.go
"istio.io/istio/pkg/util/protomarshal" ) // ClusterDiff prints a diff between Istiod and Envoy clusters to the passed writer func (c *Comparator) ClusterDiff() error { envoyBytes, istiodBytes := &bytes.Buffer{}, &bytes.Buffer{} envoyClusterDump, err := c.envoy.GetDynamicClusterDump(true) if err != nil { envoyBytes.WriteString(err.Error()) } else {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Mar 12 10:02:09 GMT 2024 - 1.9K bytes - Viewed (0) -
istioctl/pkg/writer/compare/listener.go
"istio.io/istio/pkg/util/protomarshal" ) // ListenerDiff prints a diff between Istiod and Envoy listeners to the passed writer func (c *Comparator) ListenerDiff() error { envoyBytes, istiodBytes := &bytes.Buffer{}, &bytes.Buffer{} envoyListenerDump, err := c.envoy.GetDynamicListenerDump(true) if err != nil { envoyBytes.WriteString(err.Error()) } else {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Thu Apr 04 20:29:08 GMT 2024 - 2K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/configdump_test.go
}, { name: "errors if config dump is not primed", wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { gotOut := &bytes.Buffer{} cw := &ConfigWriter{Stdout: gotOut} cd, _ := os.ReadFile("testdata/configdump.json") if tt.callPrime { cw.Prime(cd) } err := cw.PrintBootstrapDump("json") if tt.wantOutputFile != "" {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Jan 03 23:08:06 GMT 2024 - 3.5K bytes - Viewed (0) -
istioctl/pkg/writer/pilot/status_test.go
tests := []struct { name string input map[string]*discovery.DiscoveryResponse want string wantErr bool }{ { name: "prints multiple istiod inputs to buffer in alphabetical order by pod name", input: map[string]*discovery.DiscoveryResponse{ "istiod1": xdsResponseInput("istiod1", []clientConfigInput{ { proxyID: "proxy1", clusterID: "cluster1",
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Mar 08 08:38:19 GMT 2024 - 6.5K bytes - Viewed (0) -
istioctl/pkg/util/testutil/util.go
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Thu Jun 15 15:02:17 GMT 2023 - 2K bytes - Viewed (0) -
istioctl/cmd/root_test.go
_ = parent.PersistentFlags().String(parentFlag0, "", parentFlag0) _ = parent.PersistentFlags().String(parentFlag1, "", parentFlag1) _ = parent.PersistentFlags().String(parentFlag2, "", parentFlag2) var out bytes.Buffer parent.SetOut(&out) parent.SetErr(&out) child := &cobra.Command{ Use: "child", Run: func(c *cobra.Command, args []string) {}, } _ = parent.PersistentFlags().String(childFlag2, "", childFlag2)
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Jan 15 17:59:55 GMT 2021 - 2.4K bytes - Viewed (0) -
istioctl/pkg/authz/analyzer_test.go
}, LastUpdated: timestamppb.Now(), }, ClientStatus: 453, }, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { var buf bytes.Buffer a.Print(&buf) expectedOutput := "ACTION AuthorizationPolicy RULES\n" actualOutput := buf.String() if !reflect.DeepEqual(expectedOutput, actualOutput) {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Sun Apr 21 17:42:54 GMT 2024 - 2.8K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/ecds_test.go
) func TestPrintEcdsSummary(t *testing.T) { gotOut := &bytes.Buffer{} cw := &ConfigWriter{Stdout: gotOut} cd, _ := os.ReadFile("testdata/ecds/configdump.json") cw.Prime(cd) err := cw.PrintEcdsSummary() assert.NoError(t, err) util.CompareContent(t, gotOut.Bytes(), "testdata/ecds/output.txt") } func TestPrintEcdsYaml(t *testing.T) { gotOut := &bytes.Buffer{} cw := &ConfigWriter{Stdout: gotOut}
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Dec 13 01:08:07 GMT 2022 - 1.9K bytes - Viewed (0)