Documentation ¶
Overview ¶
Example (Server) ¶
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2024 Datadog, Inc. package main import ( "log" "net" "google.golang.org/grpc" extprocv3 "github.com/envoyproxy/go-control-plane/envoy/service/ext_proc/v3" gocontrolplane "gopkg.in/DataDog/dd-trace-go.v1/contrib/envoyproxy/go-control-plane" ) // interface fpr external processing server type envoyExtProcServer struct { extprocv3.ExternalProcessorServer } func main() { // Create a listener for the server. ln, err := net.Listen("tcp", ":50051") if err != nil { log.Fatal(err) } // Initialize the grpc server as normal, using the envoy server interceptor. s := grpc.NewServer() srv := &envoyExtProcServer{} // Register the appsec envoy external processor service appsecSrv := gocontrolplane.AppsecEnvoyExternalProcessorServer(srv) extprocv3.RegisterExternalProcessorServer(s, appsecSrv) // ... register your services // Start serving incoming connections. if err := s.Serve(ln); err != nil { log.Fatalf("failed to serve: %v", err) } }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppsecEnvoyExternalProcessorServer ¶
func AppsecEnvoyExternalProcessorServer(userImplementation envoyextproc.ExternalProcessorServer) envoyextproc.ExternalProcessorServer
AppsecEnvoyExternalProcessorServer creates and returns a new instance of appsecEnvoyExternalProcessorServer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.