blobpersist

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package blobpersist provides a service for persisting blob data with coordinated database metadata and object storage writes.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecoveryArtifactNotFound    = errors.New("recovery artifact not found")
	ErrRecoveryArtifactUnreadable  = errors.New("recovery artifact unreadable")
	ErrRecoveryArtifactInvalidJSON = errors.New("recovery artifact invalid json payload")
)

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service coordinates database metadata and object storage writes.

func New

func New(st store.Store, bs blobstore.Store) *Service

New creates a new blobpersist service.

func (*Service) BlobStore

func (s *Service) BlobStore() blobstore.Store

BlobStore returns the underlying blob store used by the service.

func (*Service) CloneLatestDiffByJob

func (s *Service) CloneLatestDiffByJob(ctx context.Context, sourceJobID, targetRunID, targetJobID string) error

CloneLatestDiffByJob clones the latest diff produced by sourceJobID into (targetRunID, targetJobID). The operation is idempotent: - If target job already has a diff, it is a no-op. - If source job has no diff, it is a no-op.

func (*Service) CreateArtifactBundle

func (s *Service) CreateArtifactBundle(ctx context.Context, params store.CreateArtifactBundleParams, bundle []byte) (store.ArtifactBundle, error)

CreateArtifactBundle creates an artifact bundle entry in the database and uploads the bundle to object storage.

func (*Service) CreateDiff

func (s *Service) CreateDiff(ctx context.Context, params store.CreateDiffParams, patch []byte) (store.Diff, error)

CreateDiff creates a diff entry in the database and uploads the patch to object storage.

func (*Service) CreateLog

func (s *Service) CreateLog(ctx context.Context, params store.CreateLogParams, data []byte) (store.Log, error)

CreateLog creates a log entry in the database and uploads the data to object storage.

func (*Service) CreateSpecBundle

func (s *Service) CreateSpecBundle(ctx context.Context, params store.CreateSpecBundleParams, data []byte) (store.SpecBundle, error)

CreateSpecBundle creates a spec bundle entry in the database and uploads the bundle to object storage.

func (*Service) LoadRecoveryArtifact

func (s *Service) LoadRecoveryArtifact(ctx context.Context, runID types.RunID, jobID types.JobID, expectedPath string) ([]byte, error)

LoadRecoveryArtifact resolves and reads a specific artifact path from persisted job artifact bundles. expectedPath must use absolute wire form (for example "/out/custom-artifact.json").

Jump to

Keyboard shortcuts

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