webhook

package
v1.6.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: AGPL-3.0 Imports: 23 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)
	TrackRequestMetrics(errorMessage string)
	ProcessWebRequest(writer *http.ResponseWriter, req *http.Request, reqType string, requestPayload []byte, writeKey string) string
	GetWebhookSourceDefName(writeKey string) (name string, ok bool)
	NewSourceStat(writeKey, reqType string) *gwstats.SourceStat
}

type HandleT

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

func Setup

func Setup(gwHandle GatewayI, stat stats.Stats, opts ...batchTransformerOption) *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() error

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