Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for dataPlaneCount (0.15 sec)

  1. pilot/pkg/status/distribution/report.go

    // limitations under the License.
    
    package distribution
    
    import (
    	"gopkg.in/yaml.v2"
    )
    
    type Report struct {
    	Reporter            string         `json:"reporter"`
    	DataPlaneCount      int            `json:"dataPlaneCount"`
    	InProgressResources map[string]int `json:"inProgressResources"`
    }
    
    func ReportFromYaml(content []byte) (Report, error) {
    	out := Report{}
    	err := yaml.Unmarshal(content, &out)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Nov 17 12:28:05 UTC 2021
    - 971 bytes
    - Viewed (0)
  2. pilot/pkg/status/distribution/report_test.go

    	"testing"
    
    	. "github.com/onsi/gomega"
    	"gopkg.in/yaml.v2"
    
    	"istio.io/istio/pilot/pkg/status"
    )
    
    func TestReportSerialization(t *testing.T) {
    	in := Report{
    		Reporter:       "Me",
    		DataPlaneCount: 10,
    		InProgressResources: map[string]int{
    			(&status.Resource{
    				Name:      "water",
    				Namespace: "default",
    			}).String(): 1,
    		},
    	}
    	outbytes, err := yaml.Marshal(in)
    	RegisterTestingT(t)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  3. pilot/pkg/status/distribution/reporter.go

    func (r *Reporter) buildReport() (Report, []status.Resource) {
    	r.mu.RLock()
    	defer r.mu.RUnlock()
    	var finishedResources []status.Resource
    	out := Report{
    		Reporter:            r.PodName,
    		DataPlaneCount:      len(r.status),
    		InProgressResources: map[string]int{},
    	}
    	// for every resource in flight
    	for _, ipr := range r.inProgressResources {
    		res := ipr.Resource
    		key := res.String()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jan 30 17:25:17 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  4. pilot/pkg/status/distribution/reporter_test.go

    	// build a report, which should have only two dataplanes, with 50% acking v2 of config
    	rpt, prunes := r.buildReport()
    	r.removeCompletedResource(prunes)
    	Expect(rpt.DataPlaneCount).To(Equal(2))
    	Expect(rpt.InProgressResources).To(Equal(map[string]int{
    		myResources[0].String(): 2,
    		myResources[1].String(): 1,
    		myResources[2].String(): 2,
    	}))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jan 30 17:25:17 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  5. pilot/pkg/status/distribution/state.go

    		res := *status.ResourceFromString(resstr)
    		if _, ok := c.CurrentState[res]; !ok {
    			c.CurrentState[res] = make(map[string]Progress)
    		}
    		c.CurrentState[res][d.Reporter] = Progress{d.InProgressResources[resstr], d.DataPlaneCount}
    	}
    	c.ObservationTime[d.Reporter] = c.clock.Now()
    }
    
    func (c *Controller) writeAllStatus() (staleReporters []string) {
    	defer c.mu.RUnlock()
    	c.mu.RLock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 7.7K bytes
    - Viewed (0)
Back to top