-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Interoperability - Generate new go server listening on 9999 port satisfying api schema defined in tests/schema/api.ridl - Generate go client and server during build step since it's required by webrpc-server binary - Clean test cache before each run - Test interoperability -> getting data from server, sending back and testing if everything stay the same - Implement shutdown http method on server to give client possibility of closing down the server
- Loading branch information
Lukas Jenicek
committed
Dec 17, 2022
1 parent
3ea8210
commit fdd8f05
Showing
10 changed files
with
1,635 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package main | ||
|
||
import ( | ||
"net/http" | ||
"github.com/webrpc/webrpc/tests/server" | ||
"os" | ||
) | ||
|
||
func main() { | ||
mux := http.NewServeMux() | ||
mux.Handle("/complex/rpc/ComplexApi/GetComplex", http.StripPrefix("/complex", server.NewComplexApiServer(&server.ComplexServer{}))) | ||
mux.Handle("/complex/rpc/ComplexApi/SendComplex", http.StripPrefix("/complex", server.NewComplexApiServer(&server.ComplexServer{}))) | ||
|
||
// shutdown process through http call | ||
mux.Handle("/shutdown", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
os.Exit(0) | ||
})) | ||
|
||
err := http.ListenAndServe(":9999", mux) | ||
if err != nil { | ||
panic(err) | ||
} | ||
} |
Oops, something went wrong.