commitingester

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package commitingester contains methods for handling commit ingestion.

It is able to ingest all commits reachable from a given commitish using the following steps.

  1. Retrieve up to N closest commits reachable from the given commitish and page token.
  2. Check whether those commits has already been saved into the database.
  3. If yes, stops the ingestion.
  4. If not, save those commits into the database.
  5. If root commit hasn't been reached, transactionally schedule another commit ingestion task with the next page token.

Because the ingestion stops when it encounters a commit that is already ingested, it's important to maintain the following invariants:

  • If a commit is saved into the database, all its ancestors must also have been, or scheduled to be, saved into the database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCronHandlers

func RegisterCronHandlers(srv *server.Server) error

RegisterCronHandlers registers the cron handlers for Source Index's commit ingestion.

func RegisterPubSubHandlers

func RegisterPubSubHandlers(srv *server.Server) error

RegisterPubSubHandlers registers the pubsub handlers for Source Index's commit ingestion.

func RegisterTaskQueueHandlers

func RegisterTaskQueueHandlers(srv *server.Server) error

RegisterTaskQueueHandlers registers the task queue handlers for Source Index's commit ingestion.

Types

This section is empty.

Directories

Path Synopsis
internal
taskspb
Package taskspb contains the definition for LUCI Source Index's task payloads for commit ingestion.
Package taskspb contains the definition for LUCI Source Index's task payloads for commit ingestion.

Jump to

Keyboard shortcuts

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