Versions in this module Expand all Collapse all v0 v0.2.1 Sep 26, 2026 v0.2.0 Sep 22, 2026 Changes in this version + var ErrAlreadyStarted = errors.New("runtime: already started") + var ErrBackgroundWorker = errors.New("runtime: background worker failed") + var ErrConflictingStorage = errors.New("runtime: SQLite and Postgres cannot both be configured") + var ErrExternalAdapterInSQLite = errors.New(...) + var ErrInvalidModeCombination = errors.New("runtime: invalid mode and dependency combination") + var ErrMissingTenantID = errors.New("runtime: tenant ID is required for Postgres modes") + var ErrNoStorage = errors.New("runtime: exactly one storage backend is required") + var ErrNotStarted = errors.New("runtime: not started") + var ErrSyncHubRequired = errors.New("runtime: sync requires WithSync hub URL or WithSyncHub") + type BlobStoreAdapter interface + BlobStore func() store.BlobStore + Name func() string + func TestNoopBlobStore() BlobStoreAdapter + type Builder struct + func New() *Builder + func (b *Builder) Build(ctx context.Context) (*Runtime, error) + func (b *Builder) WithAnalytics() *Builder + func (b *Builder) WithAnalyticsConcurrency(max int) *Builder + func (b *Builder) WithBuiltinOAuth(cfg BuiltinOAuthConfig) *Builder + func (b *Builder) WithDataDir(dir string) *Builder + func (b *Builder) WithExternalBlobStore(store BlobStoreAdapter) *Builder + func (b *Builder) WithExternalSearch(search ExternalSearchAdapter) *Builder + func (b *Builder) WithExternalWarehouse(warehouse WarehouseAdapter) *Builder + func (b *Builder) WithFHIRPath(engine fhirpath.Engine) *Builder + func (b *Builder) WithHTTP(addr string) *Builder + func (b *Builder) WithHTTPAuth(resolver hahttp.PrincipalResolver, checker hahttp.AuthChecker) *Builder + func (b *Builder) WithHTTPMiddleware(middleware func(http.Handler) http.Handler) *Builder + func (b *Builder) WithHTTPRateLimit(config hahttp.RateLimitConfig) *Builder + func (b *Builder) WithHooks(h hooks.Hooks) *Builder + func (b *Builder) WithMaxExpansion(max int) *Builder + func (b *Builder) WithModuleAuthorizer(authorizer modules.InstallAuthorizer) *Builder + func (b *Builder) WithModuleVerifier(verifier modules.ModuleVerifier) *Builder + func (b *Builder) WithModules(paths ...string) *Builder + func (b *Builder) WithPackageInstalls(specs ...packages.InstallSpec) *Builder + func (b *Builder) WithPostgresAllInOne(dsn, tenantID string) *Builder + func (b *Builder) WithPostgresReadReplica(dsn string) *Builder + func (b *Builder) WithPostgresSchema(schema string) *Builder + func (b *Builder) WithPreExpandValueSets(enabled bool) *Builder + func (b *Builder) WithRemoteTerminology(baseURL string) *Builder + func (b *Builder) WithRemoteTerminologyBearerToken(token string) *Builder + func (b *Builder) WithRemoteTerminologyTranslate(baseURL string) *Builder + func (b *Builder) WithRemoteTerminologyTranslateAuthorize(fn func(*http.Request) error) *Builder + func (b *Builder) WithRemoteTerminologyTranslateHeader(key, value string) *Builder + func (b *Builder) WithSDC(service hahttp.SDCService) *Builder + func (b *Builder) WithSQLite(path string) *Builder + func (b *Builder) WithSQLiteTenant(tenantID string) *Builder + func (b *Builder) WithSQLiteTerminologyScope(scope string) *Builder + func (b *Builder) WithSearch() *Builder + func (b *Builder) WithSync(hubURL string) *Builder + func (b *Builder) WithSyncHub(hub hasync.Hub) *Builder + func (b *Builder) WithSyncMiddleware(middleware func(http.Handler) http.Handler) *Builder + func (b *Builder) WithSyncNode(nodeID string) *Builder + func (b *Builder) WithSyncServer(hub hasync.HubServer) *Builder + func (b *Builder) WithViewExportDir(dir string) *Builder + type BuiltinOAuthConfig struct + AutoApprove *bool + IssuerURL string + Production bool + RegistrationAccessToken string + StateDir string + TenantID string + type CloseableAdapter interface + Close func(ctx context.Context) error + type Config struct + HTTPAddr string + Mode Mode + ModulePaths []string + OAuthEnabled bool + OAuthIssuer string + PostgresDSN string + PostgresSchema string + SQLitePath string + SQLiteTenantID string + SQLiteTerminologyScope string + SearchEnabled bool + SyncEnabled bool + SyncHubURL string + SyncNodeID string + TenantID string + type ConformanceRefresher interface + Refresh func(ctx context.Context) error + func NewConformanceRefresher(runtime *ConformanceRuntime, onDone func()) ConformanceRefresher + type ConformanceRuntime struct + func NewConformanceRuntime(cfg ConformanceRuntimeConfig) (*ConformanceRuntime, error) + func (r *ConformanceRuntime) Engine() validate.Engine + func (r *ConformanceRuntime) ProfileCatalog() *validate.RegistryProfileCatalog + func (r *ConformanceRuntime) Refresh(ctx context.Context) (*registry.Snapshot, error) + func (r *ConformanceRuntime) Snapshot() *registry.Snapshot + type ConformanceRuntimeConfig struct + Engine *validate.ReloadableEngine + FHIRPath fhirpath.Engine + InitialSnapshot *registry.Snapshot + Manager *registry.Manager + PatientResolver *registry.PatientReferenceResolver + ProfileCatalog *validate.RegistryProfileCatalog + SearchRegistry *search.SnapshotRegistry + type ExternalSearchAdapter interface + Name func() string + SearchExecutor func() store.SearchQueryExecutor + func TestNoopExternalSearch() ExternalSearchAdapter + type Mode string + const ModeCloudPostgresPlusExternalServices + const ModeEdgePostgresAllInOne + const ModeLocalSQLite + func (m Mode) String() string + type ParquetWarehouseAdapter struct + Name_ string + Sink func() store.ReportingTableStore + func (w ParquetWarehouseAdapter) Name() string + func (w ParquetWarehouseAdapter) ReportingTables() store.ReportingTableStore + type Persistence struct + Postgres *postgres.DB + SQLite *sqlite.DB + TenantDB *postgres.TenantDB + type PostgresReportingWarehouse struct + Name_ string + Store store.ReportingTableStore + func (w PostgresReportingWarehouse) Name() string + func (w PostgresReportingWarehouse) ReportingTables() store.ReportingTableStore + type Runtime struct + func (rt *Runtime) BackgroundError() error + func (rt *Runtime) Config() Config + func (rt *Runtime) HTTPAddr() net.Addr + func (rt *Runtime) Handler() http.Handler + func (rt *Runtime) IsStarted() bool + func (rt *Runtime) Mode() Mode + func (rt *Runtime) Persistence() Persistence + func (rt *Runtime) ReindexWorker() *search.ReindexWorker + func (rt *Runtime) Services() *ServiceContainer + func (rt *Runtime) Shutdown(ctx context.Context) error + func (rt *Runtime) Start(ctx context.Context) error + func (rt *Runtime) SyncEngine() *hasync.Engine + type ServiceContainer struct + AnalyticsCDC *analytics.CDCProcessor + AnalyticsRunner *analytics.Runner + BlobStore BlobStoreAdapter + BulkExportService *export.Service + BulkImportService *bulkimport.Service + ConformanceRuntime *ConformanceRuntime + ExternalSearch ExternalSearchAdapter + FHIRPathEngine fhirpath.Engine + MaterializeService *view.MaterializeService + ModuleManager *modules.Manager + RegistryManager *registry.Manager + RegistrySnapshot *registry.Snapshot + ResourceService *core.ResourceService + SQLQueryService *view.SQLQueryService + SearchService *search.Service + SubscriptionHandlers *subscriptions.HandlerRegistry + SubscriptionManager *subscriptions.Manager + SubscriptionMatcher *subscriptions.Matcher + SubscriptionProcessor *subscriptions.Processor + SyncEngine *hasync.Engine + TenantDB *postgres.TenantDB + TerminologyService terminology.Service + ViewExecutor *view.Executor + ViewExportService *view.ExportService + ViewRegistry *view.Registry + ViewRunService *view.RunService + Warehouse WarehouseAdapter + type WarehouseAdapter interface + Name func() string + ReportingTables func() store.ReportingTableStore + func TestNoopWarehouse() WarehouseAdapter