router

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: AGPL-3.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Diagnostics diagnostics.DiagnosticsI
)

Functions

func Init added in v0.1.10

func Init()

Types

type DiagnosticT added in v1.3.0

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

type Factory added in v0.1.10

type Factory struct {
	Reporting        reporter
	Multitenant      tenantStats
	BackendConfig    backendconfig.BackendConfig
	RouterDB         jobsdb.MultiTenantJobsDB
	ProcErrorDB      jobsdb.JobsDB
	TransientSources transientsource.Service
	RsourcesService  rsources.JobService
	ThrottlerFactory *throttler.Factory
	Debugger         destinationdebugger.DestinationDebugger
	AdaptiveLimit    func(int64) int64
}

func (*Factory) New added in v0.1.10

func (f *Factory) New(destination *backendconfig.DestinationT, identifier string) *HandleT

type HandleDestOAuthRespParamsT added in v0.1.10

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

type HandleT

type HandleT struct {
	MultitenantI tenantStats

	Reporting reporter
	// contains filtered or unexported fields
}

HandleT is the handle to this module.

func (*HandleT) ExecDisableDestination added in v0.1.10

func (rt *HandleT) ExecDisableDestination(destination *backendconfig.DestinationT, workspaceID, destResBody, rudderAccountId string) (int, string)

func (*HandleT) HandleOAuthDestResponse added in v0.1.10

func (rt *HandleT) HandleOAuthDestResponse(params *HandleDestOAuthRespParamsT) (int, string)

func (*HandleT) Setup

func (rt *HandleT) Setup(
	backendConfig backendconfig.BackendConfig,
	jobsDB jobsdb.MultiTenantJobsDB,
	errorDB jobsdb.JobsDB,
	destinationConfig destinationConfig,
	transientSources transientsource.Service,
	rsourcesService rsources.JobService,
	debugger destinationdebugger.DestinationDebugger,
)

Setup initializes this module

func (*HandleT) Shutdown added in v0.1.10

func (rt *HandleT) Shutdown()

func (*HandleT) Start added in v0.1.10

func (rt *HandleT) Start()

type JSONResponseHandler added in v0.1.10

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

JSONResponseHandler handler for json response

func (*JSONResponseHandler) IsSuccessStatus added in v0.1.10

func (handler *JSONResponseHandler) IsSuccessStatus(respCode int, respBody string) (returnCode int)

IsSuccessStatus - returns the status code based on the response code and body

type JobParametersT added in v0.1.10

type JobParametersT struct {
	SourceID                string      `json:"source_id"`
	DestinationID           string      `json:"destination_id"`
	ReceivedAt              string      `json:"received_at"`
	TransformAt             string      `json:"transform_at"`
	SourceTaskRunID         string      `json:"source_task_run_id"`
	SourceJobID             string      `json:"source_job_id"`
	SourceJobRunID          string      `json:"source_job_run_id"`
	SourceDefinitionID      string      `json:"source_definition_id"`
	DestinationDefinitionID string      `json:"destination_definition_id"`
	SourceCategory          string      `json:"source_category"`
	RecordID                interface{} `json:"record_id"`
	MessageID               string      `json:"message_id"`
	WorkspaceID             string      `json:"workspaceId"`
	RudderAccountID         string      `json:"rudderAccountId"`
}

JobParametersT struct holds source id and destination id of a job

type JobResponse added in v1.0.2

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

type NetHandleI added in v0.1.10

type NetHandleI interface {
	SendPost(ctx context.Context, structData integrations.PostParametersT) *utils.SendPostResponse
}

Network interface

type NetHandleT

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

NetHandleT is the wrapper holding private variables

func (*NetHandleT) SendPost added in v0.1.10

func (network *NetHandleT) SendPost(ctx context.Context, structData integrations.PostParametersT) *utils.SendPostResponse

SendPost takes the EventPayload of a transformed job, gets the necessary values from the payload and makes a call to destination to push the event to it this returns the statusCode, status and response body from the response of the destination call

func (*NetHandleT) Setup

func (network *NetHandleT) Setup(destID string, netClientTimeout time.Duration)

Setup initializes the module

type ResponseHandlerI added in v0.1.10

type ResponseHandlerI interface {
	IsSuccessStatus(respCode int, respBody string) (returnCode int)
}

ResponseHandlerI - handle destination response

func New added in v0.1.10

func New(responseRules map[string]interface{}) ResponseHandlerI

New returns a destination response handler. Can be nil(Check before using this)

type TXTResponseHandler added in v0.1.10

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

TXTResponseHandler handler for text response

func (*TXTResponseHandler) IsSuccessStatus added in v0.1.10

func (*TXTResponseHandler) IsSuccessStatus(respCode int, _ string) (returnCode int)

IsSuccessStatus - returns the status code based on the response code and body

Jump to

Keyboard shortcuts

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