ingress

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: 9 Imported by: 0

Documentation

Overview

Package ingress implements the intentionally small webhook commit path.

Index

Constants

View Source
const (
	// WebhookPath is the GitHub App webhook target served by ghsyncd.
	WebhookPath = "/webhooks/github"
	// HealthPath is the process liveness endpoint.
	HealthPath = "/healthz"
)

Variables

This section is empty.

Functions

func NewMux

func NewMux(webhook http.Handler) *http.ServeMux

NewMux composes liveness with an optional GitHub webhook route.

Types

type DeliveryInserter

type DeliveryInserter interface {
	InsertWebhookDelivery(
		ctx context.Context,
		arg dbgen.InsertWebhookDeliveryParams,
	) (int64, error)
}

DeliveryInserter is the single allowed ingress persistence operation (SYNC_ENGINE C-I1/C-P1).

type Handler

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

Handler verifies and durably records GitHub webhook deliveries.

func NewHandler

func NewHandler(
	deliveries DeliveryInserter,
	webhookSecret string,
	maxBodyBytes int64,
	requestTimeout time.Duration,
) *Handler

NewHandler constructs a webhook handler around sqlc's generated insert.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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