webhook

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type GatewayI

type GatewayI interface {
	IncrementRecvCount(count uint64)
	IncrementAckCount(count uint64)
	UpdateSourceStats(writeKeyStats map[string]int, bucket string, sourceTagMap map[string]string)
	TrackRequestMetrics(errorMessage string)
	ProcessWebRequest(writer *http.ResponseWriter, req *http.Request, reqType string, requestPayload []byte, writeKey string) string
	GetWebhookSourceDefName(writeKey string) (name string, ok bool)
}

type HandleT

type HandleT struct {
	// contains filtered or unexported fields
}

func Setup

func Setup(gwHandle GatewayI) *HandleT

func (*HandleT) Register

func (webhook *HandleT) Register(name string)

func (*HandleT) RequestHandler

func (webhook *HandleT) RequestHandler(w http.ResponseWriter, r *http.Request)

func (*HandleT) Shutdown

func (webhook *HandleT) Shutdown()

type WebHookI

type WebHookI interface {
	RequestHandler(w http.ResponseWriter, r *http.Request)
	Register(name string)
}

Jump to

Keyboard shortcuts

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