Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for MessageSlice (0.13 sec)

  1. istioctl/pkg/util/proto/messageslice.go

    	"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
    func (pSlice MessageSlice) MarshalJSON() ([]byte, error) {
    	buffer := bytes.NewBufferString("[")
    	sliceLength := len(pSlice)
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Tue Oct 19 21:53:59 UTC 2021
    - 1.3K bytes
    - Viewed (0)
  2. istioctl/pkg/writer/envoy/clusters/clusters.go

    func (c *ConfigWriter) PrintEndpoints(filter EndpointFilter, outputFormat string) error {
    	if c.clusters == nil {
    		return fmt.Errorf("config writer has not been primed")
    	}
    
    	filteredClusters := proto.MessageSlice{}
    	for _, cluster := range c.clusters.ClusterStatuses {
    		for _, host := range cluster.HostStatuses {
    			if filter.Verify(host, cluster.Name) {
    				filteredClusters = append(filteredClusters, cluster)
    				break
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Nov 03 08:41:32 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  3. istioctl/pkg/writer/envoy/configdump/endpoint.go

    	if c.configDump == nil {
    		return fmt.Errorf("config writer has not been primed")
    	}
    	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" {
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Mon Jul 22 09:57:29 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. istioctl/pkg/writer/envoy/configdump/route.go

    func (c *ConfigWriter) PrintRouteDump(filter RouteFilter, outputFormat string) error {
    	_, routes, err := c.setupRouteConfigWriter()
    	if err != nil {
    		return err
    	}
    	filteredRoutes := make(proto.MessageSlice, 0, len(routes))
    	for _, route := range routes {
    		if filter.Verify(route) {
    			filteredRoutes = append(filteredRoutes, route)
    		}
    	}
    	out, err := json.MarshalIndent(filteredRoutes, "", "    ")
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Aug 08 20:44:50 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  5. istioctl/pkg/writer/envoy/configdump/cluster.go

    func (c *ConfigWriter) PrintClusterDump(filter ClusterFilter, outputFormat string) error {
    	_, clusters, err := c.setupClusterConfigWriter()
    	if err != nil {
    		return err
    	}
    	filteredClusters := make(proto.MessageSlice, 0, len(clusters))
    	for _, cluster := range clusters {
    		if filter.Verify(cluster) {
    			filteredClusters = append(filteredClusters, cluster)
    		}
    	}
    	out, err := json.MarshalIndent(filteredClusters, "", "    ")
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu May 11 05:38:17 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  6. istioctl/pkg/writer/envoy/configdump/listener.go

    func (c *ConfigWriter) PrintListenerDump(filter ListenerFilter, outputFormat string) error {
    	_, listeners, err := c.setupListenerConfigWriter()
    	if err != nil {
    		return err
    	}
    	filteredListeners := proto.MessageSlice{}
    	for _, listener := range listeners {
    		if filter.Verify(listener) {
    			filteredListeners = append(filteredListeners, listener)
    		}
    	}
    	out, err := json.MarshalIndent(filteredListeners, "", "    ")
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Nov 29 12:37:14 UTC 2023
    - 18.1K bytes
    - Viewed (0)
Back to top