Documentation ¶
Index ¶
- type KeyPlayer
- type QueueHandler
- func (queueHandler *QueueHandler) AddPlayer(responseWriter http.ResponseWriter, request *http.Request)
- func (queueHandler *QueueHandler) Delete(responseWriter http.ResponseWriter, request *http.Request)
- func (queueHandler *QueueHandler) InQueue(responseWriter http.ResponseWriter, request *http.Request)
- func (queueHandler *QueueHandler) LivenessCheck(responseWriter http.ResponseWriter, request *http.Request)
- func (queueHandler *QueueHandler) MiddlewarePlayerValidation(next http.Handler) http.Handler
- func (queueHandler *QueueHandler) ReadinessCheck(responseWriter http.ResponseWriter, request *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyPlayer ¶
type KeyPlayer struct{}
KeyPlayer is a key used for the Player object inside context
type QueueHandler ¶
type QueueHandler struct{}
QueueHandler contains the items common to all queue handler functions
func NewQueueHandler ¶
func NewQueueHandler() *QueueHandler
NewQueueHandler returns a pointer to a QueueHandler with the logger passed as a parameter
func (*QueueHandler) AddPlayer ¶
func (queueHandler *QueueHandler) AddPlayer(responseWriter http.ResponseWriter, request *http.Request)
AddPlayer add the player to the queue from the received JSON
func (*QueueHandler) Delete ¶
func (queueHandler *QueueHandler) Delete(responseWriter http.ResponseWriter, request *http.Request)
Delete a player with specified id from the queue
func (*QueueHandler) InQueue ¶
func (queueHandler *QueueHandler) InQueue(responseWriter http.ResponseWriter, request *http.Request)
InQueue returns a bool that verifies that a player is queued
func (*QueueHandler) LivenessCheck ¶
func (queueHandler *QueueHandler) LivenessCheck(responseWriter http.ResponseWriter, request *http.Request)
LivenessCheck determine when the application needs to be restarted
func (*QueueHandler) MiddlewarePlayerValidation ¶
func (queueHandler *QueueHandler) MiddlewarePlayerValidation(next http.Handler) http.Handler
MiddlewarePlayerValidation is used to validate incoming player JSONS
func (*QueueHandler) ReadinessCheck ¶
func (queueHandler *QueueHandler) ReadinessCheck(responseWriter http.ResponseWriter, request *http.Request)
ReadinessCheck verifies that the application is ready to accept requests
Source Files ¶
Click to show internal directories.
Click to hide internal directories.