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 ¶
func (d *Deliverer) ProcessJob(ctx context.Context, job githubissuedeliveryv1.GitHubIssueDeliveryEvent) error
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.