pipelinesinkeffects

package
v0.0.0-...-5106b98 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package pipelinesinkeffects persists durable pipeline sink side-effect decisions.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrPipelineSinkEffectNotFound indicates that no effect exists in the requested tenant scope.
	ErrPipelineSinkEffectNotFound = xerror.NotFound(xerror.PipelineSinkEffect).Detail("pipeline sink effect not found")

	// ErrProjectEnvironmentNotFound indicates that the requested tenant environment is unavailable.
	ErrProjectEnvironmentNotFound = xerror.NotFound(xerror.ProjectEnvironment)
)

Functions

This section is empty.

Types

type Repository

type Repository interface {
	BeginOrGet(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, environmentSlug slug.Slug,
		attempt pipelinerun.SinkEffectAttempt,
	) (*pipelinerun.SinkEffect, error)
	MarkSucceeded(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, environmentSlug slug.Slug,
		attempt pipelinerun.SinkEffectAttempt,
	) error
}

Repository persists pre-effect claims and terminal success for one sink execution. Each method receives the caller's transaction explicitly so runtime orchestration can make the ledger durable before invoking an external provider.

func New

func New() Repository

New creates a SQLC-backed durable sink-effect repository.

func NewRepositoryWithLogging

func NewRepositoryWithLogging(base Repository, logger *slog.Logger) Repository

NewRepositoryWithLogging wraps base with method completion logging.

type RepositoryWithLogging

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

RepositoryWithLogging implements Repository with method completion logging.

func (RepositoryWithLogging) BeginOrGet

func (_d RepositoryWithLogging) BeginOrGet(ctx context.Context, tx postgres.DBTX, orgSlug slug.Slug, projectSlug slug.Slug, environmentSlug slug.Slug, attempt pipelinerun.SinkEffectAttempt) (sp1 *pipelinerun.SinkEffect, err error)

BeginOrGet implements Repository.

func (RepositoryWithLogging) MarkSucceeded

func (_d RepositoryWithLogging) MarkSucceeded(ctx context.Context, tx postgres.DBTX, orgSlug slug.Slug, projectSlug slug.Slug, environmentSlug slug.Slug, attempt pipelinerun.SinkEffectAttempt) (err error)

MarkSucceeded implements Repository.

Jump to

Keyboard shortcuts

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