Documentation
¶
Overview ¶
Package gateio maps provider/ledger state into the pure gate kernel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcquireFunc ¶
AcquireFunc acquires one non-blocking run lock.
type Options ¶
type Options struct {
Store Store
Provider outbox.LiveProvider
Limiter outbox.Limiter
Layout statepaths.Layout
Acquire AcquireFunc
Now func() time.Time
StaleHeartbeatThreshold time.Duration
Warnings io.Writer
ApprovalOverride approvaloverride.Classifier
}
Options contains gate IO dependencies.
type Request ¶
type Request struct {
PRRef gitprovider.PRRef
PR gitprovider.PR
PRKey string
Profile string
PostingIdentity gitprovider.Identity
PostingIdentityKey string
ResolveThreadPermissionAdvisory bool
FreshRunID string
Flags gate.Flags
ArtifactPath string
}
Request identifies one gate evaluation.
type Result ¶
type Result struct {
Status Status
Decision gate.Decision
Run ledger.Run
Lock Lock
OutboxResult outbox.Result
Warnings []string
}
Result is the outcome of one gate IO evaluation.
type Status ¶
type Status string
Status identifies how gate IO resolved the request.
const ( StatusContinue Status = "continue" StatusEarlyExit Status = "early_exit" StatusDryRunFresh Status = "dry_run_fresh" StatusRepairExecuted Status = "repair_executed" StatusRetryPostsExecuted Status = "retry_posts_executed" StatusApprovalOverride Status = "approval_override_executed" StatusError Status = "error" StatusBaseMovedAbort Status = "base_moved_abort" )
Result status values.
type Store ¶
type Store interface {
ListRunsForHeadScope(context.Context, ledger.ListRunsForHeadScopeParams) ([]ledger.Run, error)
GetRun(context.Context, string) (ledger.Run, error)
ListPlannedActions(context.Context, string) ([]ledger.PlannedAction, error)
AllocateRun(context.Context, ledger.AllocateRunParams) (ledger.Run, error)
InsertPlannedAction(context.Context, ledger.PlannedAction) error
UpdatePlannedAction(context.Context, ledger.PlannedAction) error
DeleteRun(context.Context, string) error
CompleteRun(context.Context, string, ledger.Outcome, time.Time) error
}
Store is the ledger behavior required by gate IO.
Click to show internal directories.
Click to hide internal directories.