pipelinesinkeffects

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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