Documentation
¶
Index ¶
- Variables
- func AbortTransitionID(w http.ResponseWriter, req *http.Request)
- func CreateRouterAndHandler()
- func CreateTransition(w http.ResponseWriter, req *http.Request)
- func GetHealth(w http.ResponseWriter, req *http.Request)
- func GetLiveness(w http.ResponseWriter, req *http.Request)
- func GetPowerCap(w http.ResponseWriter, req *http.Request)
- func GetPowerCapQuery(w http.ResponseWriter, req *http.Request)
- func GetPowerStatus(w http.ResponseWriter, req *http.Request)
- func GetReadiness(w http.ResponseWriter, req *http.Request)
- func GetTransitions(w http.ResponseWriter, req *http.Request)
- func GetUUIDFromVars(key string, r *http.Request) (passback model.Passback)
- func Index(w http.ResponseWriter, r *http.Request)
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter() *mux.Router
- func PatchPowerCap(w http.ResponseWriter, req *http.Request)
- func SnapshotPowerCap(w http.ResponseWriter, req *http.Request)
- func WriteHeaders(w http.ResponseWriter, pb model.Passback)
- func WriteHeadersWithLocation(w http.ResponseWriter, pb model.Passback, location string)
- func WriteJSON(w http.ResponseWriter, i interface{})
- type Route
- type Routes
Constants ¶
This section is empty.
Variables ¶
var IsHandled bool
IsHandled - setups protection for the mutex
Functions ¶
func AbortTransitionID ¶
func AbortTransitionID(w http.ResponseWriter, req *http.Request)
AbortTransitionID - abort transition by transitionID
func CreateRouterAndHandler ¶
func CreateRouterAndHandler()
CreateRouterAndHandler - Create a singleton for setting up routing for the UnitTests
func CreateTransition ¶
func CreateTransition(w http.ResponseWriter, req *http.Request)
CreateTransition - creates a transition and will trigger a 'transition' flow
func GetHealth ¶
func GetHealth(w http.ResponseWriter, req *http.Request)
GetHealth - Returns various health information
func GetLiveness ¶
func GetLiveness(w http.ResponseWriter, req *http.Request)
Returns the microservice liveness indicator. Any response means we're live.
func GetPowerCap ¶
func GetPowerCap(w http.ResponseWriter, req *http.Request)
GetPowerCap - Get PowerCap tasks array
func GetPowerCapQuery ¶
func GetPowerCapQuery(w http.ResponseWriter, req *http.Request)
GetPowerCapQuery - Get PowerCap information by ID
func GetPowerStatus ¶
func GetPowerStatus(w http.ResponseWriter, req *http.Request)
GetPowerStatus - Returns the power status of the hardware
func GetReadiness ¶
func GetReadiness(w http.ResponseWriter, req *http.Request)
Readiness - Returns the microservice readiness indicator
func GetTransitions ¶
func GetTransitions(w http.ResponseWriter, req *http.Request)
GetTransitions - returns all transitions
func GetUUIDFromVars ¶
GetUUIDFromVars - attempts to retrieve a UUID from an http.Request URL returns a passback
func Logger ¶
Logger - used for logging what methods were invoked and how long they took to complete
func PatchPowerCap ¶
func PatchPowerCap(w http.ResponseWriter, req *http.Request)
PatchPowerCap - Patch power-cap values
func SnapshotPowerCap ¶
func SnapshotPowerCap(w http.ResponseWriter, req *http.Request)
SnapshotPowerCap - creates a power cap snapshot for an array of xnames
func WriteHeaders ¶
func WriteHeaders(w http.ResponseWriter, pb model.Passback)
WriteHeaders - writes JSON to the open http connection along with headers
func WriteHeadersWithLocation ¶
func WriteHeadersWithLocation(w http.ResponseWriter, pb model.Passback, location string)
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, i interface{})
WriteJSON - writes JSON to the open http connection