Documentation ¶
Overview ¶
Package routing has all the routing activities. It also has the static IP of the RPi client/server that triggers the experiment.
Index ¶
- Variables
- func ActiveUsersGet(w http.ResponseWriter, r *http.Request)
- func ActiveUsersPost(w http.ResponseWriter, r *http.Request)
- func ExperimentComplete(w http.ResponseWriter, r *http.Request)
- func ForwardToRPi(w http.ResponseWriter, r *http.Request)
- func GetViews(w http.ResponseWriter, r *http.Request)
- func SetupRouting(r *mux.Router) *mux.Router
- func Trigger(w http.ResponseWriter, r *http.Request)
- func TriggerGet(w http.ResponseWriter, r *http.Request)
- type ActiveRequest
- type ExperimentCompleteResponse
- type TriggerRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var Flag int
Flag int to maintain first user or last
View Source
var NumActiveUsers int
View Source
var ServerData server.Data
ServerData contains all the data in the server
View Source
var URL string
URL is the IP address of the RPi in the local network.
Functions ¶
func ActiveUsersGet ¶
func ActiveUsersGet(w http.ResponseWriter, r *http.Request)
ActiveUsersGet does stuff
func ActiveUsersPost ¶
func ActiveUsersPost(w http.ResponseWriter, r *http.Request)
ActiveUsers gets all users
func ExperimentComplete ¶
func ExperimentComplete(w http.ResponseWriter, r *http.Request)
ExperimentComplete is for the RPi to tell that it is free
func ForwardToRPi ¶
func ForwardToRPi(w http.ResponseWriter, r *http.Request)
ForwardToRPi forwards a basic test request to the RPi
func SetupRouting ¶
SetupRouting sets up the routing for the server
Types ¶
type ActiveRequest ¶
type ActiveRequest struct {
Data int
}
type ExperimentCompleteResponse ¶
type ExperimentCompleteResponse struct {
IP string
}
ExperimentCompleteResponse struct
type TriggerRequest ¶
TriggerRequest is the request format of the Trigger function
Click to show internal directories.
Click to hide internal directories.