fetcher

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package fetcher provides a utilities that combines together various other libraries to run a fetch end-to-end.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidTransactionTime = errors.New("failed to get transaction timestamp")

ErrInvalidTransactionTime is returned (wrapped) when a TransactionTimeStore fails to produce a valid timestamp. This is primarily used for testing.

Functions

This section is empty.

Types

type Fetcher

type Fetcher struct {
	Client               *bulkfhir.Client
	Pipeline             *processing.Pipeline
	TransactionTimeStore bulkfhir.TransactionTimeStore
	TransactionTime      *bulkfhir.TransactionTime

	// If specified, no new job is started, and the Fetcher waits for this job to
	// complete before processing data from it.
	JobURL string

	// Resource types to request if no JobURL is specified. May be empty.
	ResourceTypes []cpb.ResourceTypeCode_Value

	// Group to export if no JobURL is specified. If empty, defaults to exporting
	// data for all patients.
	ExportGroup string

	// How frequently to poll for job status if the server does not return a
	// Retry-After header
	JobStatusPeriod time.Duration

	// How long to poll for job status for before giving up.
	JobStatusTimeout time.Duration

	// How many times to retry fetching each data URL.
	DataRetryCount int
}

Fetcher is a utility for running a bulk FHIR fetch end-to-end.

func (*Fetcher) Run

func (f *Fetcher) Run(ctx context.Context) error

Run the bulk FHIR fetch end-to-end. Note that while this does finalize the configured processing pipeline, it does not close the bulk FHIR client.

Jump to

Keyboard shortcuts

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