executionbroker

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAmbiguousExecution = xerror.ExecutionUnavailable().Detail(
	"execution outcome is ambiguous; automatic retry is forbidden",
)

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) Process

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

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

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