fetch

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package fetch turns durable River pointers into budget-gated authoritative GitHub fetches and transactional mirror writes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortedPullRequestKeys

func SortedPullRequestKeys(records []store.PullRequestRecord) []string

func StartBackfill

func StartBackfill(
	ctx context.Context,
	pool *pgxpool.Pool,
	client *river.Client[pgx.Tx],
	installationID int64,
	repoFullName string,
) (dbgen.BackfillCursor, error)

StartBackfill remains a focused test/ops seam; production CLI onboarding uses StartInstallationBackfill so C-O5 begins at installation enumeration.

func StartInstallationBackfill

func StartInstallationBackfill(
	ctx context.Context,
	pool *pgxpool.Pool,
	client *river.Client[pgx.Tx],
	installationID int64,
) (dbgen.InstallationBackfillCursor, error)

Types

type Handler

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

func New

func New(options Options) (*Handler, error)

func (*Handler) BackfillInstallationPage

func (h *Handler) BackfillInstallationPage(
	ctx context.Context,
	args queue.BackfillInstallationPageArgs,
) error

func (*Handler) BackfillRepoPage

func (h *Handler) BackfillRepoPage(
	ctx context.Context,
	args queue.BackfillRepoPageArgs,
) error

func (*Handler) RefreshBranch

func (h *Handler) RefreshBranch(
	ctx context.Context,
	request queue.RefreshRequest,
) error

func (*Handler) RefreshChecks

func (h *Handler) RefreshChecks(
	ctx context.Context,
	request queue.RefreshRequest,
) error

func (*Handler) RefreshPR

func (h *Handler) RefreshPR(
	ctx context.Context,
	request queue.RefreshRequest,
) error

func (*Handler) RefreshRepoRules

func (h *Handler) RefreshRepoRules(
	ctx context.Context,
	request queue.RefreshRequest,
) error

func (*Handler) RefreshRepository

func (h *Handler) RefreshRepository(
	ctx context.Context,
	request queue.RefreshRequest,
) error

func (*Handler) RefreshStack

func (h *Handler) RefreshStack(
	ctx context.Context,
	request queue.RefreshRequest,
) error

func (*Handler) ResolveStackMembership

func (h *Handler) ResolveStackMembership(
	ctx context.Context,
	request queue.RefreshRequest,
) error

func (*Handler) SetRiverClient

func (h *Handler) SetRiverClient(client *river.Client[pgx.Tx])

type Options

type Options struct {
	Pool             *pgxpool.Pool
	REST             *gh.RESTClient
	GraphQL          *gh.GraphQLClient
	InstallationID   int64
	OrgID            int64
	BatchWindow      time.Duration
	BackfillPageSize int
	CacheObserver    store.CacheObserver
}

Jump to

Keyboard shortcuts

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