Documentation ¶
Index ¶
- Variables
- func Router(s *Server) *mux.Router
- type ErrorResponse
- type Heartbeat
- type Option
- type Queue
- type RetryResponse
- type SendResponse
- type Server
- func (s *Server) HealthHandler(rw http.ResponseWriter, _ *http.Request)
- func (s *Server) RetryHandler(rw http.ResponseWriter, req *http.Request)
- func (s *Server) SendHandler(rw http.ResponseWriter, req *http.Request)
- func (s *Server) Start() error
- func (s *Server) StatusHandler(rw http.ResponseWriter, req *http.Request)
- type StatusResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHeartbeatError = errors.New("an error was encountered while sending the heartbeat")
Functions ¶
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Errors []string `json:"errors"`
}
type Heartbeat ¶ added in v0.3.0
type Heartbeat interface { Start() Shutdown() }
func NewHeartbeat ¶ added in v0.3.0
func NewHeartbeat() Heartbeat
type Queue ¶
type Queue interface { Enqueue(*eventsapi.EventContainer) (string, error) Retry(string) (int, error) Shutdown() error Start() error Status(string) ([]persistentqueue.StatusItem, error) }
type RetryResponse ¶
type RetryResponse struct {
Message string `json:"message"`
}
type SendResponse ¶
type SendResponse struct {
Key string `json:"key"`
}
type Server ¶
type Server struct { HTTPServer *http.Server Queue Queue Heartbeat Heartbeat // contains filtered or unexported fields }
func (*Server) HealthHandler ¶
func (s *Server) HealthHandler(rw http.ResponseWriter, _ *http.Request)
func (*Server) RetryHandler ¶
func (s *Server) RetryHandler(rw http.ResponseWriter, req *http.Request)
func (*Server) SendHandler ¶
func (s *Server) SendHandler(rw http.ResponseWriter, req *http.Request)
func (*Server) StatusHandler ¶
func (s *Server) StatusHandler(rw http.ResponseWriter, req *http.Request)
type StatusResponse ¶
type StatusResponse struct {
StatusItems []persistentqueue.StatusItem `json:"status_items,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.