backendbundle

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package backendbundle provides access to the embedded Orun backend artifacts: the Cloudflare Worker bundle, D1 SQL migrations, and a manifest describing default resource names and binding names.

To refresh artifacts from sourceplane/orun-backend:

cp orun-backend/apps/worker/dist/index.js orun/internal/backendbundle/embed/worker/index.js
cp orun-backend/migrations/*.sql orun/internal/backendbundle/embed/migrations/
# Update embed/manifest.json with the new backend commit SHA and date.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WorkerBundle

func WorkerBundle() []byte

WorkerBundle returns the raw bytes of the embedded Worker module bundle.

Types

type Manifest

type Manifest struct {
	BackendCommitSHA        string                   `json:"backendCommitSHA"`
	BundleDate              string                   `json:"bundleDate"`
	WorkerScriptName        string                   `json:"workerScriptName"`
	D1DatabaseName          string                   `json:"d1DatabaseName"`
	R2BucketName            string                   `json:"r2BucketName"`
	CatalogQueueName        string                   `json:"catalogQueueName"`
	CatalogDLQName          string                   `json:"catalogDLQName"`
	CatalogCron             string                   `json:"catalogCron"`
	CatalogConsumerSettings ManifestConsumerSettings `json:"catalogConsumerSettings"`
	DurableObjectClasses    []string                 `json:"durableObjectClasses"`
	Bindings                struct {
		DurableObjects []string `json:"durableObjects"`
		D1             string   `json:"d1"`
		R2             string   `json:"r2"`
		Queue          string   `json:"queue"`
	} `json:"bindings"`
	Vars    []string `json:"vars"`
	Secrets []string `json:"secrets"`
}

Manifest describes the embedded backend artifact metadata.

func GetManifest

func GetManifest() (*Manifest, error)

GetManifest returns the decoded bundle manifest.

type ManifestConsumerSettings

type ManifestConsumerSettings struct {
	BatchSize     int `json:"batchSize"`
	MaxRetries    int `json:"maxRetries"`
	MaxWaitTimeMs int `json:"maxWaitTimeMs"`
}

ManifestConsumerSettings holds the default queue consumer configuration for the embedded backend.

type Migration

type Migration struct {
	Name string
	SQL  string
}

Migration is a single embedded SQL migration.

func Migrations

func Migrations() ([]Migration, error)

Migrations returns all embedded D1 migrations in lexical filename order.

Jump to

Keyboard shortcuts

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