handler

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL