executionbroker

package
v0.5.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 55 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

Index

Constants

View Source
const ErrFTPArtifactBindingRefused = FTPArtifactError(artifactBindingRefused)

ErrFTPArtifactBindingRefused means current authority does not allow the pinned read.

View Source
const ErrFTPArtifactExpired = FTPArtifactError("artifact_expired")

ErrFTPArtifactExpired means the verified read reached the receipt deadline.

Variables

View Source
var ErrAmbiguousExecution = xerror.ExecutionUnavailable().Detail(
	"execution outcome is ambiguous; automatic retry is forbidden",
)
View Source
var ErrFTPArtifactSubmissionUnknown = xerror.New(xerror.KindInternal, "FTP_ARTIFACT_SUBMISSION_UNKNOWN", "FTP artifact submission outcome is unknown")

ErrFTPArtifactSubmissionUnknown means the submission transaction may have committed.

Functions

This section is empty.

Types

type Broker

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

Broker owns persisted request submission and the shared request processor. factory is required only in compositions that process execution requests.

func New

func New(
	txm postgres.TransactionManager,
	cipher crypto.AES256,
	dispatcher Dispatcher,
	requestTimeout time.Duration,
	factory connector.NewConnectorFunc,
	logger *slog.Logger,
	admission operationAdmission,
) (*Broker, error)

func (*Broker) Close

func (b *Broker) Close() error

Close releases process-owned connector pools after execution processing stops.

func (*Broker) ExecuteConnector

func (b *Broker) ExecuteConnector(
	ctx context.Context,
	request queriessvc.ConnectorExecutionRequest,
) (*result.ExecutionResult, error)

func (*Broker) ExecuteGitDelete

func (b *Broker) ExecuteGitDelete(ctx context.Context, request pipelinegit.RemoteDeleteRequest) error

func (*Broker) ExecuteGitProposal

func (b *Broker) ExecuteGitProposal(
	ctx context.Context,
	request pipelinegit.RemoteProposalRequest,
) (*pipelinegit.ProposalResult, error)

func (*Broker) ExecuteGitProposalRefresh

func (b *Broker) ExecuteGitProposalRefresh(
	ctx context.Context,
	request pipelinegit.RemoteProposalRefreshRequest,
) (*pipelinegit.ProposalResult, error)

func (*Broker) ExecuteGitRepository

func (*Broker) ExecuteGitSourceSnapshot

func (b *Broker) ExecuteGitSourceSnapshot(
	ctx context.Context,
	request pipelinegit.RemoteSourceRequest,
) (*pipelinegit.RemoteSourceSnapshot, error)

func (*Broker) ExecuteGitWrite

func (b *Broker) ExecuteGitWrite(ctx context.Context, request pipelinegit.RemoteWriteRequest) error

func (*Broker) ExecuteTransform

func (b *Broker) ExecuteTransform(
	ctx context.Context,
	request pipelineruntime.TransformExecutionRequest,
) (*pipepayload.Output, error)

func (*Broker) IntrospectSchema

func (b *Broker) IntrospectSchema(
	ctx context.Context,
	request datasourcessvc.SchemaIntrospectionRequest,
) ([]byte, error)

func (*Broker) ListGitBranches

func (b *Broker) ListGitBranches(
	ctx context.Context,
	request datasourcessvc.GitBranchRequest,
) ([]datasourcessvc.DataSourceBranch, error)

func (*Broker) ObserveProof

func (*Broker) PreflightProcessor

func (b *Broker) PreflightProcessor(ctx context.Context) error

PreflightProcessor verifies the River worker's request-processing capabilities before it starts consuming execution jobs.

func (*Broker) PrepareFTPArtifact

func (b *Broker) PrepareFTPArtifact(ctx context.Context, req FTPArtifactRequest) (ftp.ArtifactEvidence, error)

func (*Broker) Process

Process claims and executes one opaque delivery without acknowledging a duplicate while another worker still owns its live lease.

func (*Broker) PublishFTPArtifact

func (b *Broker) PublishFTPArtifact(ctx context.Context, req FTPArtifactRequest) error

func (*Broker) ReadFTPArtifact

func (b *Broker) ReadFTPArtifact(ctx context.Context, req FTPArtifactRequest) (*result.FileResult, error)

func (*Broker) Start

func (b *Broker) Start(ctx context.Context, concurrency int) error

Start launches independent database pollers. The executor role has no River grants, so compromised tenant execution cannot inspect or mutate control jobs.

func (*Broker) StartMaintenance

func (b *Broker) StartMaintenance(ctx context.Context)

StartMaintenance schedules deletion of expired encrypted envelopes on the control-plane connection. Executor credentials intentionally cannot delete or scan envelope rows.

func (*Broker) StartProcessorObservability

func (b *Broker) StartProcessorObservability(ctx context.Context, concurrency int) error

StartProcessorObservability publishes the shared persisted-envelope signals for River processors. River's own queue metrics remain the source of job and worker heartbeat state.

func (*Broker) TestConnection

func (b *Broker) TestConnection(ctx context.Context, request datasourcessvc.ConnectionTestRequest) error

type Dispatcher

type Dispatcher interface {
	Dispatch(context.Context, postgres.DBTX, uuid.UUID) error
}

func NewPollerDispatcher

func NewPollerDispatcher() Dispatcher

type FTPArtifactError

type FTPArtifactError string

FTPArtifactError describes a local refusal or a completed broker outcome. RetryableRead identifies only completed transient provider failures.

func (FTPArtifactError) ArtifactReadReason

func (e FTPArtifactError) ArtifactReadReason() string

ArtifactReadReason returns the bounded read result used by pipeline completion.

func (FTPArtifactError) Error

func (e FTPArtifactError) Error() string

func (FTPArtifactError) PublicationUncertain

func (e FTPArtifactError) PublicationUncertain() bool

PublicationUncertain reports that the executor could not prove the outcome after dispatch.

func (FTPArtifactError) RetryableRead

func (e FTPArtifactError) RetryableRead() bool

type FTPArtifactRequest

type FTPArtifactRequest struct {
	queriessvc.ConnectorExecutionRequest
	ftp.ArtifactEvidence
	Directory            string
	SavedQueryData       json.RawMessage `json:"artifact_saved_query_data,omitempty"`
	Content              json.RawMessage `json:"artifact_content,omitempty"`
	PublishRequestID     uuid.UUID
	ProjectEnvironmentID int64
	ReadQueryID          int64
	ReadQueryUpdatedAt   time.Time
	CompletionSnapshotID int
	ConsumerAttempt      slug.Slug
}

FTPArtifactRequest is internal to trusted orchestration and the encrypted broker. The namespace, pinned operation and receipt are resolved by Core.

Directories

Path Synopsis
portable
e2e
Package e2e contains the explicitly tagged portable_executor container suite.
Package e2e contains the explicitly tagged portable_executor container suite.

Jump to

Keyboard shortcuts

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