outbox

package
v0.10.255 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package outbox posts planned review actions through the host-agnostic provider seam.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InlineCommentPayload

type InlineCommentPayload = plannedactions.InlineCommentPayload

InlineCommentPayload is an alias for the canonical inline comment payload.

type Limiter

type Limiter interface {
	Wait(context.Context, string) error
}

Limiter gates provider write calls.

type LiveProvider added in v0.10.255

type LiveProvider interface {
	Provider
	GetPR(context.Context, gitprovider.PRRef) (gitprovider.PR, error)
}

LiveProvider adds the pull-request read required by live orchestration.

type Options

type Options struct {
	Store    Store
	Provider Provider
	Limiter  Limiter
	Now      func() time.Time
}

Options contains post-phase dependencies.

type Provider added in v0.10.255

Provider is the git-provider behavior required by the post phase.

type Request

type Request struct {
	Run                             ledger.Run
	PRRef                           gitprovider.PRRef
	PostingIdentity                 gitprovider.Identity
	DesiredOutcome                  ledger.Outcome
	ResolveThreadPermissionAdvisory bool
}

Request identifies the run and PR being posted.

type ResolveThreadPayload

type ResolveThreadPayload = plannedactions.ResolveThreadPayload

ResolveThreadPayload is an alias for the canonical resolve-thread payload.

type Result

type Result struct {
	Outcome        ledger.Outcome
	ExitCode       int
	Posted         int
	Pending        int
	FailedTerminal int
	Aborted        bool
}

Result summarizes post-phase state after Post returns.

func Post

func Post(ctx context.Context, opts Options, req Request) (Result, error)

Post reconciles and posts pending actions for one live run.

type RollupCommentPayload

type RollupCommentPayload = plannedactions.RollupCommentPayload

RollupCommentPayload is an alias for the canonical rollup comment payload.

type Store

type Store interface {
	ListPlannedActions(ctx context.Context, runID string) ([]ledger.PlannedAction, error)
	UpdatePlannedAction(ctx context.Context, action ledger.PlannedAction) error
	CompleteRun(ctx context.Context, runID string, outcome ledger.Outcome, completedAt time.Time) error
}

Store is the durable state required by the post phase.

type SubmitReviewPayload

type SubmitReviewPayload = plannedactions.SubmitReviewPayload

SubmitReviewPayload is an alias for the canonical submit-review payload.

type ThreadReplyPayload

type ThreadReplyPayload = plannedactions.ThreadReplyPayload

ThreadReplyPayload is an alias for the canonical thread reply payload.

type TokenBucket

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

TokenBucket is a goroutine-safe per-host posting limiter.

func NewTokenBucket

func NewTokenBucket(interval time.Duration, burst int) (*TokenBucket, error)

NewTokenBucket creates a per-host token bucket.

func (*TokenBucket) Wait

func (b *TokenBucket) Wait(ctx context.Context, host string) error

Wait blocks until a token is available for host or ctx is canceled.

Jump to

Keyboard shortcuts

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