Spaces:
Runtime error
Runtime error
package main | |
import ( | |
"net/http" | |
"github.com/arpinfidel/p2p-llm/auth" | |
"github.com/arpinfidel/p2p-llm/peers" | |
"github.com/arpinfidel/p2p-llm/proxy" | |
) | |
func RegisterRoutes( | |
authHandler *auth.AuthHandler, | |
peerHandler *peers.PeerHandler, | |
jwtMiddleware *auth.JWTMiddleware, | |
proxyHandler *proxy.ProxyHandler, | |
) { | |
http.HandleFunc("/auth", authHandler.ServeHTTP) | |
http.HandleFunc("/trusted-peers", peerHandler.ListTrustedPeers) | |
http.Handle("/", jwtMiddleware.Middleware(http.HandlerFunc(proxyHandler.Handle))) | |
} | |