49 lines
1.1 KiB
Go
49 lines
1.1 KiB
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
"time"
|
|
|
|
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
|
|
)
|
|
|
|
func (s *Server) handleInvokeFunction(w http.ResponseWriter, r *http.Request, name string) {
|
|
// ...existing code...
|
|
}
|
|
|
|
func (s *Server) handleFissionFunctionGateway(w http.ResponseWriter, r *http.Request) {
|
|
// ...existing code...
|
|
}
|
|
|
|
func (s *Server) invokeInternalFunction(w http.ResponseWriter, r *http.Request, namespace, functionName, extraPath string) {
|
|
// ...existing code...
|
|
}
|
|
|
|
func (s *Server) handleInvokeRoute(w http.ResponseWriter, r *http.Request) {
|
|
// ...existing code...
|
|
}
|
|
|
|
func buildInternalInvokeURL(routerURL, namespace, functionName string) string {
|
|
// ...existing code...
|
|
}
|
|
|
|
func resolveInvokeTimeout(fn *unstructured.Unstructured) time.Duration {
|
|
// ...existing code...
|
|
}
|
|
|
|
func shouldForwardRequestBody(method string) bool {
|
|
// ...existing code...
|
|
}
|
|
|
|
func copyProxyRequestHeaders(dst, src http.Header) {
|
|
// ...existing code...
|
|
}
|
|
|
|
func copyProxyResponseHeaders(dst, src http.Header) {
|
|
// ...existing code...
|
|
}
|
|
|
|
func doRequestWithContextTimeout(client *http.Client, req *http.Request) (*http.Response, error) {
|
|
// ...existing code...
|
|
}
|