Documentation
¶
Index ¶
- type Server
- func (s *Server) CampaignDescribeHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) CampaignHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) CampaignListHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) HealthzHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) ResultsHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) StatusUpdateHandler(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server carries context for the http handlers to work from. it keeps track of the current server's database connection pool and scheduler.
func (*Server) CampaignDescribeHandler ¶ added in v0.1.2
func (s *Server) CampaignDescribeHandler(w http.ResponseWriter, r *http.Request)
CampaignDescribeHandler takes a user-defined DB query with the campaignID, then returns the parameters of that campaign via JSON
func (*Server) CampaignHandler ¶
func (s *Server) CampaignHandler(w http.ResponseWriter, r *http.Request)
CampaignHandler receives data from the user about the desired campaign configuration. it then inserts the associated metadata into the db and schedules the campaign.
func (*Server) CampaignListHandler ¶ added in v0.1.2
func (s *Server) CampaignListHandler(w http.ResponseWriter, r *http.Request)
CampaignListHandler accepts no parameters and returns the list of active campaigns via JSON
func (*Server) HealthzHandler ¶
func (s *Server) HealthzHandler(w http.ResponseWriter, r *http.Request)
HealthzHandler is for k8s health checking, this always returns 200
func (*Server) ResultsHandler ¶
func (s *Server) ResultsHandler(w http.ResponseWriter, r *http.Request)
ResultsHandler takes a user defined database query (returned fields + filter) and applies it, returning the results in JSON
func (*Server) StatusUpdateHandler ¶ added in v0.1.4
func (s *Server) StatusUpdateHandler(w http.ResponseWriter, r *http.Request)
StatusUpdateHandler takes a campaignID from the user, then sets its status based on the post body content.