Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for handler (0.23 sec)

  1. istioctl/pkg/admin/istiodconfig_test.go

    	case http.MethodGet:
    		_, _ = writer.Write([]byte(getResponse))
    	}
    }
    
    func setupHTTPServer() (*httptest.Server, *url.URL) {
    	handler := http.NewServeMux()
    	handler.HandleFunc("/scopej/ads", adsHandler)
    	handler.HandleFunc("/scopej/resource", resourceHandler)
    	server := httptest.NewServer(handler)
    	url, _ := url.Parse(server.URL)
    	return server, url
    }
    
    func Test_flagState_run(t *testing.T) {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  2. cni/pkg/log/uds.go

    	Msg   string    `json:"msg"`
    }
    
    func NewUDSLogger() *UDSLogger {
    	l := &UDSLogger{}
    	mux := http.NewServeMux()
    	mux.HandleFunc(constants.UDSLogPath, l.handleLog)
    	loggingServer := &http.Server{
    		Handler: mux,
    	}
    	l.loggingServer = loggingServer
    	return l
    }
    
    // StartUDSLogServer starts up a UDS server which receives log reported from CNI network plugin.
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Nov 29 01:05:12 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. istioctl/pkg/util/handlers/handlers.go

    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package handlers
    
    import (
    	"context"
    	"errors"
    	"fmt"
    	"sort"
    	"strings"
    	"time"
    
    	corev1 "k8s.io/api/core/v1"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/labels"
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Feb 06 15:01:41 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  4. istioctl/pkg/util/handlers/handlers_test.go

    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package handlers
    
    import (
    	"fmt"
    	"net/http"
    	"sort"
    	"strings"
    	"testing"
    	"time"
    
    	appsv1 "k8s.io/api/apps/v1"
    	corev1 "k8s.io/api/core/v1"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jun 09 18:17:49 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/informers.go

    		// We have no good way to distinguish between these two cases from here. But we don't need to!
    		// Existing pods will be handled by the dataplane using `GetAmbientPods`,
    		// and the initial enqueueNamespace, and new pods will be handled by the CNI.
    
    	case controllers.EventUpdate:
    		// For update, we just need to handle opt outs
    		newPod := event.New.(*corev1.Pod)
    		oldPod := event.Old.(*corev1.Pod)
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri May 03 19:29:42 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  6. cni/pkg/nodeagent/cni-watcher.go

    	s := &CniPluginServer{
    		handlers:  handlers,
    		dataplane: dataplane,
    		cniListenServer: &http.Server{
    			Handler: mux,
    		},
    		cniListenServerCancel: cancel,
    		sockAddress:           pluginSocket,
    		ctx:                   ctx,
    	}
    
    	mux.HandleFunc(pconstants.CNIAddEventPath, s.handleAddEvent)
    	return s
    }
    
    func (s *CniPluginServer) Stop() {
    	s.cniListenServerCancel()
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 18:52:24 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  7. cni/pkg/nodeagent/server.go

    		isReady:    ready,
    		dataplane: &meshDataplane{
    			kubeClient: client.Kube(),
    			netServer:  netServer,
    		},
    	}
    	s.NotReady()
    	s.handlers = setupHandlers(s.ctx, s.kubeClient, s.dataplane, args.SystemNamespace)
    
    	cniServer := startCniPluginServer(ctx, pluginSocket, s.handlers, s.dataplane)
    	err = cniServer.Start()
    	if err != nil {
    		return nil, fmt.Errorf("error starting cni server: %w", err)
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  8. operator/cmd/mesh/profile-dump.go

    	}
    	return out2, nil
    }
    
    // Convert the generated YAML to pretty JSON.
    func yamlToPrettyJSON(yml string) (string, error) {
    	// YAML objects are not completely compatible with JSON
    	// objects. Let yaml.YAMLToJSON handle the edge cases and
    	// we'll re-encode the result to pretty JSON.
    	uglyJSON, err := yaml.YAMLToJSON([]byte(yml))
    	if err != nil {
    		return "", err
    	}
    	var decoded any
    	if uglyJSON[0] == '[' {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 01:18:49 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  9. 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)
  10. cni/pkg/nodeagent/cni-watcher_test.go

    	).Return(nil)
    
    	dpServer := &meshDataplane{
    		kubeClient: client.Kube(),
    		netServer:  fs,
    	}
    
    	handlers := setupHandlers(ctx, client, dpServer, "istio-system")
    
    	// We are not going to start the server, so the sockpath is irrelevant
    	pluginServer := startCniPluginServer(ctx, "/tmp/test.sock", handlers, dpServer)
    
    	// label the namespace
    	labelsPatch := []byte(fmt.Sprintf(`{"metadata":{"labels":{"%s":"%s"}}}`,
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu May 02 21:29:40 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top