Documentation
¶
Overview ¶
Package api provides HTTP handlers for the API endpoints.
Index ¶
- func GetStateAction(w http.ResponseWriter, _ *http.Request)
- func HealthAction(w http.ResponseWriter, _ *http.Request)
- func HostnameAction(w http.ResponseWriter, _ *http.Request)
- func ReadyAction(w http.ResponseWriter, _ *http.Request)
- func UpdateStateAction(w http.ResponseWriter, r *http.Request)
- type UpdateStateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStateAction ¶
func GetStateAction(w http.ResponseWriter, _ *http.Request)
GetStateAction handles GET requests to retrieve the state
func HealthAction ¶
func HealthAction(w http.ResponseWriter, _ *http.Request)
HealthAction handles health check requests
func HostnameAction ¶ added in v0.5.0
func HostnameAction(w http.ResponseWriter, _ *http.Request)
HostnameAction handles requests to return the server hostname
func ReadyAction ¶
func ReadyAction(w http.ResponseWriter, _ *http.Request)
ReadyAction handles readiness check requests
func UpdateStateAction ¶
func UpdateStateAction(w http.ResponseWriter, r *http.Request)
UpdateStateAction handles PUT/POST requests to update the state
Types ¶
type UpdateStateRequest ¶
type UpdateStateRequest struct {
Value string `json:"value"`
}
UpdateStateRequest represents the request body for updating state
Click to show internal directories.
Click to hide internal directories.