delivery

package
v0.0.0-...-7dfa3a9 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientFactory

type ClientFactory func(token string) GitHubIssueCreator

ClientFactory creates a GitHubIssueCreator for an auth token.

type Deliverer

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

Deliverer coordinates lock acquisition, issue rendering, and issue creation.

func NewDeliverer

func NewDeliverer(
	tokenProvider TokenProvider,
	clientFactory ClientFactory,
	storer LockStorer,
	workerLockID string,
	frontendBaseURL string,
) *Deliverer

NewDeliverer creates a new Deliverer instance.

func (*Deliverer) ProcessJob

ProcessJob executes the issue delivery workflow with distributed lock protection.

type GitHubIssueCreator

type GitHubIssueCreator interface {
	CreateIssue(ctx context.Context, owner, repo string, req *github.IssueRequest) (*github.Issue, error)
}

GitHubIssueCreator defines the GitHub issue creation operations.

type LockStorer

type LockStorer interface {
	AcquireDeliveryLock(
		ctx context.Context,
		subscriptionID, deliveryID, workerLockID string,
		ttl time.Duration,
	) (bool, error)
	RecordDeliverySuccess(
		ctx context.Context, deliveryID string, workerLockID string, issueID string, issueURL string) error
	ReleaseDeliveryLock(ctx context.Context, deliveryID string, workerLockID string) error
}

LockStorer defines the Spanner operations for lock management and delivery recording.

type TokenProvider

type TokenProvider interface {
	GetInstallationToken(ctx context.Context, installationID string) (string, error)
}

TokenProvider defines the token retrieval interface for GitHub App installations.

Jump to

Keyboard shortcuts

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