types

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: AGPL-3.0 Imports: 4 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

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"`
}

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