types

package
v1.6.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RouterUnMarshalErrorCode = 599
	RouterTimedOutStatusCode = 1113
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DestinationJobT

type DestinationJobT struct {
	Message          json.RawMessage            `json:"batchedRequest"`
	JobMetadataArray []JobMetadataT             `json:"metadata"` // multiple jobs may be batched in a single message
	Destination      backendconfig.DestinationT `json:"destination"`
	Batched          bool                       `json:"batched"`
	StatusCode       int                        `json:"statusCode"`
	Error            string                     `json:"error"`
}

DestinationJobT holds the job to be sent to destination and metadata of all the router jobs from which this job is cooked up

func (*DestinationJobT) JobIDs added in v1.0.2

func (dj *DestinationJobT) JobIDs() map[int64]struct{}

JobIDs returns the set of all job ids contained in the message

func (*DestinationJobT) MinJobID added in v1.6.0

func (dj *DestinationJobT) MinJobID() int64

type EventTypeThrottlingCost added in v1.5.0

type EventTypeThrottlingCost map[string]interface{}

func NewEventTypeThrottlingCost added in v1.5.0

func NewEventTypeThrottlingCost(m map[string]interface{}) (v EventTypeThrottlingCost)

func (*EventTypeThrottlingCost) Cost added in v1.5.0

func (e *EventTypeThrottlingCost) Cost(eventType string) (cost int64)

type JobMetadataT

type JobMetadataT struct {
	UserID             string          `json:"userId"`
	JobID              int64           `json:"jobId"`
	SourceID           string          `json:"sourceId"`
	DestinationID      string          `json:"destinationId"`
	AttemptNum         int             `json:"attemptNum"`
	ReceivedAt         string          `json:"receivedAt"`
	CreatedAt          string          `json:"createdAt"`
	FirstAttemptedAt   string          `json:"firstAttemptedAt"`
	TransformAt        string          `json:"transformAt"`
	WorkspaceID        string          `json:"workspaceId"`
	Secret             json.RawMessage `json:"secret"`
	JobT               *jobsdb.JobT    `json:"jobsT"`
	WorkerAssignedTime time.Time       `json:"workerAssignedTime"`
	DestInfo           json.RawMessage `json:"destInfo,omitempty"`
}

JobMetadataT holds the job metadata

type RouterJobT

type RouterJobT struct {
	Message     json.RawMessage            `json:"message"`
	JobMetadata JobMetadataT               `json:"metadata"`
	Destination backendconfig.DestinationT `json:"destination"`
}

RouterJobT holds the router job and its related metadata

type TransformMessageT

type TransformMessageT struct {
	Data     []RouterJobT `json:"input"`
	DestType string       `json:"destType"`
}

TransformMessageT is used to pass message to the transformer workers

func (*TransformMessageT) JobIDs added in v1.0.2

func (tm *TransformMessageT) JobIDs() map[int64]struct{}

JobIDs returns the set of all job ids of the jobs in the message

Jump to

Keyboard shortcuts

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