destinationdebugger

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithDisableEventUploads = func(disableEventDeliveryStatusUploads bool) func(h *Handle) {
	return func(h *Handle) {
		h.disableEventDeliveryStatusUploads = disableEventDeliveryStatusUploads
	}
}

Functions

This section is empty.

Types

type DeliveryStatusT

type DeliveryStatusT struct {
	DestinationID string          `json:"destinationId"`
	SourceID      string          `json:"sourceId"`
	Payload       json.RawMessage `json:"payload"`
	AttemptNum    int             `json:"attemptNum"`
	JobState      string          `json:"jobState"`
	ErrorCode     string          `json:"errorCode"`
	ErrorResponse json.RawMessage `json:"errorResponse"`
	SentAt        string          `json:"sentAt"`
	EventName     string          `json:"eventName"`
	EventType     string          `json:"eventType"`
}

DeliveryStatusT is a structure to hold everything related to event delivery

type DestinationDebugger added in v1.6.0

type DestinationDebugger interface {
	RecordEventDeliveryStatus(destinationID string, deliveryStatus *DeliveryStatusT) bool
	HasUploadEnabled(destID string) bool
	Stop()
}

func NewHandle added in v1.6.0

func NewHandle(backendConfig backendconfig.BackendConfig, opts ...Opt) (DestinationDebugger, error)

func NewNoOpService added in v1.6.0

func NewNoOpService() DestinationDebugger

type EventDeliveryStatusUploader

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

func NewEventDeliveryStatusUploader added in v1.6.0

func NewEventDeliveryStatusUploader(log logger.Logger) *EventDeliveryStatusUploader

func (*EventDeliveryStatusUploader) Transform

func (e *EventDeliveryStatusUploader) Transform(deliveryStatusesBuffer []*DeliveryStatusT) ([]byte, error)

type Handle added in v1.6.0

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

func (*Handle) HasUploadEnabled added in v1.6.0

func (h *Handle) HasUploadEnabled(destID string) bool

func (*Handle) RecordEventDeliveryStatus added in v1.6.0

func (h *Handle) RecordEventDeliveryStatus(destinationID string, deliveryStatus *DeliveryStatusT) bool

RecordEventDeliveryStatus is used to put the delivery status in the deliveryStatusesBatchChannel, which will be processed by handleJobs.

func (*Handle) Stop added in v1.6.0

func (h *Handle) Stop()

type Opt added in v1.6.0

type Opt func(*Handle)

Jump to

Keyboard shortcuts

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