Documentation
¶
Overview ¶
Package eventshttp serves how a managed script's event runs stand (#2332): each event a webhook source stores enqueues one run of every script with a webhook handler for it (#2434), with trigger event. Which sources a script runs for is its handlers', set through internal/httpserver/scripthttp/ handlerhttp.
The composition root mounts it beside scripthttp (ForPortal), whose owner check it uses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Summary is how the script's event runs stand (scriptevents.PostgresStore).
Summary func(ctx context.Context, scriptID string, since time.Time) (scriptevents.EventSummary, error)
// MaxQueued is scripts.events.max_queued; zero is the default.
MaxQueued int
}
Config is the store event runs are read from.
type Deps ¶
type Deps struct {
// Config is the event run store.
Config Config
// Owned resolves the script in the path for its owner or an
// administrator, writing any refusal itself.
Owned func(w http.ResponseWriter, r *http.Request) (scriptID, actor string, ok bool)
// Now is the clock; nil is time.Now.
Now func() time.Time
}
Deps carries what the routes need.
Click to show internal directories.
Click to hide internal directories.