Documentation ¶
Overview ¶
Package handlers contains the http handlers which receive requests to be processed by the API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeltaHandler ¶
type DeltaHandler struct {
// contains filtered or unexported fields
}
DeltaHandler offers a handler by which to publish a chs-delta onto the a chosen delta kafka topic.
func NewDeltaHandler ¶
func NewDeltaHandler(kSvc services.KafkaService, h helpers.Helper, chv validation.CHValidator, cfg *config.Config, doValidationOnly bool, isDelete bool, topic string) *DeltaHandler
NewDeltaHandler returns an DeltaHandler.
func (*DeltaHandler) ServeHTTP ¶
func (kp *DeltaHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP accepts an incoming Delta request via a POST method, validates it and if doValidationOnly flag is set to false, passes it to a Kafka service for further processing along with a chosen chs-delta topic. If errors are encountered then they will be returned via the ResponseWriter.
Click to show internal directories.
Click to hide internal directories.