Documentation
¶
Overview ¶
Package blobpersist provides a service for persisting blob data with coordinated database metadata and object storage writes.
Index ¶
- Variables
- type Service
- func (s *Service) BlobStore() blobstore.Store
- func (s *Service) CloneLatestDiffByJob(ctx context.Context, sourceJobID, targetRunID, targetJobID string) error
- func (s *Service) CreateArtifactBundle(ctx context.Context, params store.CreateArtifactBundleParams, bundle []byte) (store.ArtifactBundle, error)
- func (s *Service) CreateDiff(ctx context.Context, params store.CreateDiffParams, patch []byte) (store.Diff, error)
- func (s *Service) CreateLog(ctx context.Context, params store.CreateLogParams, data []byte) (store.Log, error)
- func (s *Service) CreateSpecBundle(ctx context.Context, params store.CreateSpecBundleParams, data []byte) (store.SpecBundle, error)
- func (s *Service) LoadRecoveryArtifact(ctx context.Context, runID types.RunID, jobID types.JobID, expectedPath string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
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 (*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").