Documentation
¶
Overview ¶
Package worker processes chunk jobs and publishes output events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLambdaExecutionLimitExceeded = errors.New("excedeu o limite de execução da lambda")
ErrLambdaExecutionLimitExceeded identifies work deliberately stopped before the Lambda runtime can terminate the invocation. Callers use this to record an incomplete chunk with a reason that is actionable in the ledger.
Functions ¶
This section is empty.
Types ¶
type ChunkProcessingResult ¶
type ChunkProcessingResult struct {
JobID string
FileID string
ChunkID string
Bucket string
Key string
StartByte int64
EndByte int64
Attempt int
BytesProcessed int64
RecordsProcessed int64
ProcessingTimeMillis int64
TPS float64
}
ChunkProcessingResult contains metrics from processing a chunk
type Service ¶
type Service struct {
Resolver port.SourceResolver
Queue port.Queue
Ledger port.JobLedger
CompletionLedger port.CompletionLedger
Config config.Config
}
func (Service) ProcessAttempt ¶
ProcessAttempt records the delivery attempt reported by SQS in the ledger.
func (Service) ProcessWithMetrics ¶
func (s Service) ProcessWithMetrics(ctx context.Context, body []byte) (*ChunkProcessingResult, error)
ProcessWithMetrics processes a chunk and returns metrics
Click to show internal directories.
Click to hide internal directories.