processing

package module
v0.0.0-...-a61834f Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 16 Imported by: 0

README

Pipeline

The processing pipeline works in these stages:

  • Collections: Read the config that define each collection
  • Collections Manifest: For each collection, process (in-order) the files specified
  • Unzip: Unzip a file for a collection
  • Read: Read/parse the content of a file
  • Generate: Generate meaningful records from parsed file content
  • Persist: Persist valid records

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Process

func Process(ins []<-chan *ProcessingPayload, destinationDirectory string, deleteDestinationDirectory bool, dataStore *data_store.DataStore)

Types

type Collection

type Collection struct {
	Collection       string                 `json:"collection"`
	ComparisonFields []string               `json:"comparisonFields"`
	Mappings         map[string]interface{} `json:"mappings"`
}

type ImportManifest

type ImportManifest struct {
	SourceFiles []struct {
		Zip       string `json:"zip"`
		PathInZip string `json:"pathInZip"`
	} `json:"sourceFiles"`
}

type ProcessingContext

type ProcessingContext struct {
	Label           string
	RateTracker     *stats.RateTracker
	DataStore       *data_store.DataStore
	StatsTracker    *stats.StatsTracker
	ProcessorsTotal int
	Strategy        ProcessingStrategy
}

type ProcessingPayload

type ProcessingPayload struct {
	Value interface{}
}

type ProcessingStrategy

type ProcessingStrategy string
const (
	WaitUntilAllDone ProcessingStrategy = "WaitUntilAllDone"
	SerialPerInput   ProcessingStrategy = "SerialPerInput"
)

type ProcessorHandler

type ProcessorHandler func(ctx *ProcessingContext, in <-chan *ProcessingPayload) <-chan *ProcessingPayload

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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