--- /dev/null
+{
+ "IDX.aI.enableCodebaseIndexing": true,
+ "IDX.corgiMode": true
+}
\ No newline at end of file
--- /dev/null
+#/usr/bin/env bash
+#
+#
+#This is a bit of a setup to export the server
+export port=8000
+export API_SERVICE="${port}-${HOSTNAME}.cluster-lknrrkkitbcdsvoir6wqg4mwt6.cloudworkstations.dev"
+echo $API_SERVICE
--- /dev/null
+#/usr/bin/env bash
+wget https://go.dev/dl/go1.20.6.linux-amd64.tar.gz
+rm -rf /usr/local/go && tar -C /usr/local -xzf go1.20.6.linux-amd64.tar.gz
+export PATH=$PATH:/usr/local/go/bin
+rm go1.20.6*
+go version
require staticHandlers v0.0.0
+require (
+ github.com/keegancsmith/rpc v1.1.0 // indirect
+ github.com/stamblerre/gocode v1.0.0 // indirect
+ golang.org/x/mod v0.12.0 // indirect
+ golang.org/x/sys v0.10.0 // indirect
+ golang.org/x/tools v0.11.0 // indirect
+)
+
replace staticHandlers v0.0.0 => ./handlers/static/
github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8=
github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
+github.com/keegancsmith/rpc v1.1.0 h1:bXVRk3EzbtrEegTGKxNTc+St1lR7t/Z1PAO8misBnCc=
+github.com/keegancsmith/rpc v1.1.0/go.mod h1:Xow74TKX34OPPiPCdz6x1o9c0SCxRqGxDuKGk7ZOo8s=
+github.com/stamblerre/gocode v1.0.0 h1:5aTRgkRTOS8mELHoKatkwhfX44OdEV3iwu3FCXyvLzk=
+github.com/stamblerre/gocode v1.0.0/go.mod h1:ONyGamdxpnxaG2+XLyGkNuuoYISmz0QFVHScxvsXsqM=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
+golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
+golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab h1:tpc/nJ4vD66vAk/2KN0sw/DvQIz2sKmCpWvyKtPmfMQ=
+golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.11.0 h1:EMCa6U9S2LtZXLAMoWiR/R8dAQFRqbAitmbJ2UKhoi8=
+golang.org/x/tools v0.11.0/go.mod h1:anzJrxPjNtfgiYQYirP2CPGzGLxrH2u2QBhn6Bf3qY8=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
// the special agent that each of them will already have installed in order to
// connect to the cluster.
func MasterHealthHandler(w http.ResponseWriter, r *http.Request) {
- fmt.Fprintf("Ëverything should be okay my boi")
+ w.WriteHeader(http.StatusOK)
+ fmt.Fprintf(w, "Ëverything should be okay my boi")
}
func MasterHealthHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, "Ëverything should be okay my boi")
+ fmt.Println("health handler")
}
// the special agent that each of them will already have installed in order to
// connect to the cluster.
func MasterHealthHandler(w http.ResponseWriter, r *http.Request) {
- fmt.Fprintf("Ëverything should be okay my boi")
+ w.WriteHeader(http.StatusOK)
+ fmt.Fprintf(w, "Ëverything should be okay my boi")
}
// the special agent that each of them will already have installed in order to
// connect to the cluster.
func MasterHealthHandler(w http.ResponseWriter, r *http.Request) {
- fmt.Fprintf("Ëverything should be okay my boi")
+ w.WriteHeader(http.StatusOK)
+ fmt.Fprintf(w, "Ëverything should be okay my boi")
}
// the special agent that each of them will already have installed in order to
// connect to the cluster.
func MasterHealthHandler(w http.ResponseWriter, r *http.Request) {
- fmt.Fprintf("Ëverything should be okay my boi")
+ w.WriteHeader(http.StatusOK)
+ fmt.Fprintf(w, "Ëverything should be okay my boi")
}
--- /dev/null
+{
+ "previews": [
+ {
+ "command": ["go","run","vscpweb.go"],
+ "id": "web",
+ "manager": "web"
+ }
+ ]
+ }
\ No newline at end of file
// This is a system for playing with SDN based openvswitches using a simple web
// interface. This project will be combined with a CLI version or probably just
// made compatible with a core version in the future.
-package vscpweb
+package main
import (
"fmt"
"net/http"
hh "healthHandlers"
- mh "managementHandlers"
- vh "virtualAPIHandlers"
- ch "controllerHandlers"
- sh "staticHandlers"
+ //mh "managementHandlers"
+ //vh "virtualAPIHandlers"
+ //ch "controllerHandlers"
+ //sh "staticHandlers"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
//healthRouter.Get("/", )//this renders the health page "/health"
//healthRouter.Get("/ping", )// "/rpiping"
healthRouter.Get("/masterHealth", hh.MasterHealthHandler) //return a JSON with healt of the master "/free"
+ healthRouter.Get("/", hh.MasterHealthHandler) //return a JSON with healt of the master "/free"
//controllerRouter.Delete("/flow", )//this is an external request "/flowdel"
//controllerRouter.Get("/resetflows", )//not sure if here or managementRouter
//controllerRouter.Get("/listswitch", )