-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRUD API for GameServerBuild/GameServer CRs (GameServer API) #79
Comments
Are we thinking of writing this API in go?
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
)
type Article struct {
Title string `json:"Title"`
Desc string `json:"desc"`
Content string `json:"content"`
}
type Articles []Article
func allArticles(w http.ResponseWriter, r *http.Request) {
articles := Articles{
Article{Title: "thundernetes", Desc: "thundernetes API", Content: "Howdy"},
}
fmt.Println("thundernetes endpoint Hit: All Articles Endpoint")
fmt.Println("All Articles: ", articles)
json.NewEncoder(w).Encode(articles)
}
func homePage(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "thundernetes homepage endpoint hit")
}
func handleRequests() {
http.HandleFunc("/", homePage)
http.HandleFunc("/articles", allArticles)
log.Fatal(http.ListenAndServe(":8081", nil))
}
func main() {
handleRequests()
} |
yeah, I'd prefer it. It would easily fetch the CRD types from this repo. .NET is kinda tricky to do, check here for some code of the original sidecar (which was written in .NET) https://github.com/PlayFab/thundernetes/blob/72d501ad20dcc5ca76773b6fd6ea18cac62b5185/sidecar-netcore/Controllers/ThundernetesController.cs |
The APIs we need
comments
|
The API has been created and integrated, we should create some end to end tests as well. Plus, we'd need to modify our publishing pipeline to publish a container image as well. Keeping this open till we complete these tasks. |
Opened #123 to cover the missing end to end tests for the GameServer API, closing this. |
We should create CRUD APIs for GameServerBuild and GameServer CRs. This API should also serve as a basis for #16
The text was updated successfully, but these errors were encountered: