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 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.
Click to show internal directories.
Click to hide internal directories.