Documentation ¶
Overview ¶
Package handler contains the logic for handling SNS notifications over HTTP.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles the HTTP notifications sent to a SNS topic.
func New ¶
func New(src *v1alpha1.AWSSNSSource, logger *zap.SugaredLogger, ceClient cloudevents.Client, snsClient snsclient.Client) *Handler
New returns an initialized Handler.
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler. Confirms subscriptions when the incoming payload is a subscription confirmation message. Otherwise, converts SNS notifications to CloudEvents and sends them to the configured event sink.
Click to show internal directories.
Click to hide internal directories.